SQL Self JOIN : SQL Self JOIN is a regular join, but the table is joined with itself. Self JOIN Syntax SELECT column_name(s) FROM table1 T1, table1 T2
Read moreCategory: SQL
SQL UNION Operator
SQL UNION Operator : SQL UNION Operator is used to combine the result-set of two or more SELECT statements. Each SELECT statement within UNION must have
Read moreSQL GROUP BY Statement
SQL GROUP BY Statement : SQL GROUP BY Statement is often used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one
Read moreSQL HAVING Clause
SQL HAVING Clause : SQL HAVING clause was added to SQL because the WHERE keyword could not be used with aggregate functions. HAVING Syntax SELECT column_name(s) FROM table_name
Read moreSQL EXISTS Operator
SQL EXISTS Operator : SQL EXISTS Operator is used to test for the existence of any record in a subquery. The EXISTS operator returns true if
Read moreSQL ANY and ALL Operators
SQL ANY and ALL Operators : SQL ANY and ALL Operators are used with a WHERE or HAVING clause. The ANY operator returns true if any of
Read moreSQL SELECT INTO Statement
SQL SELECT INTO Statement : SQL SELECT INTO statement copies data from one table into a new table. SELECT INTO Syntax Copy all columns into
Read moreSQL INSERT INTO SELECT Statement
SQL INSERT INTO SELECT Statement : SQL INSERT INTO SELECT Statement copies data from one table and inserts it into another table. INSERT INTO SELECT requires that
Read moreSQL NULL Functions
SQL NULL Functions : SQL NULL Functions are SQL IFNULL(), ISNULL(), COALESCE(), and NVL() Functions Look at the following “Products” table: P_Id ProductName UnitPrice UnitsInStock UnitsOnOrder 1
Read moreSQL Comments
SQL Comments : SQL Comments are used to explain sections of SQL statements, or to prevent execution of SQL statements. Note: The examples in this chapter will
Read more