Archive for December 10, 2009

Interesting to Queries

Avoid Duplicate Records
SELECT DISTINCT SALARY
FROM EMPLOYEE
Union of two Records-Duplicates are removed

SELECT Date FROM Store_Information
UNION

Union All -Here Duplicates are not removed

Pattern Matching-comparison on condition
%- zero or more characters
_underscore -Single character
SQL IN –

SELECT “column_name”
FROM “table_name”
WHERE “column_name” IN (‘value1′, ‘value2′, …)

An SQL JOIN clause combines records from two or more tables in a database.




Follow

Get every new post delivered to your Inbox.