learn php, learn jquery, learn asp.net, learn javascript, learn html, learn css, learn xml, learn ruby on rails, learn python
Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts
Thursday, February 12, 2015
Wednesday, June 26, 2013
SQL UNION Operator
SQL UNION Operator
The UNION operator is used to combine the result-set of two or more SELECT statements.
SELECT column_name(s) FROM table1
UNION
SELECT column_name(s) FROM table2;
The UNION operator is used to combine the result-set of two or more SELECT statements.
SELECT column_name(s) FROM table1
UNION
SELECT column_name(s) FROM table2;
SQL RIGHT JOIN
SQL RIGHT JOIN
The RIGHT JOIN keyword returns all rows from the right table (table2), with the matching rows in the left table (table1). The result is NULL in the left side whenthere is no match.
SELECT column_name(s)
FROM table1
RIGHT JOIN table2
ON table1.column_name=table2.column_name;
The RIGHT JOIN keyword returns all rows from the right table (table2), with the matching rows in the left table (table1). The result is NULL in the left side whenthere is no match.
SELECT column_name(s)
FROM table1
RIGHT JOIN table2
ON table1.column_name=table2.column_name;
SQL LEFT JOIN
SQL LEFT JOIN
The LEFT JOIN keyword returns all rows from the left table (table1), with the matching rows in the right table (table2). The result is NULL in the right side whenthere is no match.
SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name=table2.column_name;
The LEFT JOIN keyword returns all rows from the left table (table1), with the matching rows in the right table (table2). The result is NULL in the right side whenthere is no match.
SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name=table2.column_name;
Sunday, June 23, 2013
PDO vs MYSQLI
PDO MySQLi
Database support 12 different drivers MySQL only
API OOP OOP + procedural
Connection Easy Easy
Named parameters Yes No
Object mapping Yes Yes
Prepared statements
(client side) Yes No
Performance Fast Fast
Stored procedures Yes Yes
Database Support
PDO:
CUBIRD, mysql server, firebird/interbase, ibm, informix, mysql, oracle, odbc, db2, postgresql, sqlite, 4d
mysqli:
mysql
Database support 12 different drivers MySQL only
API OOP OOP + procedural
Connection Easy Easy
Named parameters Yes No
Object mapping Yes Yes
Prepared statements
(client side) Yes No
Performance Fast Fast
Stored procedures Yes Yes
Database Support
PDO:
CUBIRD, mysql server, firebird/interbase, ibm, informix, mysql, oracle, odbc, db2, postgresql, sqlite, 4d
mysqli:
mysql
Subscribe to:
Posts (Atom)