Logical Operators – SQL Server Syntax Example: Logical Operators – T-SQL Example

Logical Operators – SQL Server Syntax Example: Logical Operators – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the logical operators. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE expression1 logical_operator expression2 ] [ GROUP BY ] [ HAVING search_condition ] [ ORDER BY order_expression... [Read More...]

LIKE – SQL Server Syntax Example: LIKE – T-SQL Example

LIKE – SQL Server Syntax Example: LIKE – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the LIKE. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE match_expression [ NOT ] LIKE pattern [ ESCAPE escape_character ] ] [ GROUP BY ] [ HAVING search_condition ] [ ORDER BY order_expression [ ASC... [Read More...]

ISNULL – SQL Server Syntax Example: ISNULL – T-SQL Example

ISNULL – SQL Server Syntax Example: ISNULL – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the ISNULL. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] column_list, ISNULL(check_expression, replacement_value) [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE search_condition ] [ GROUP BY ] [ HAVING search_condition ] [ ORDER BY order_expression... [Read More...]

IS NULL – SQL Server Syntax Example: IS NULL – T-SQL Example

IS NULL – SQL Server Syntax Example: IS NULL – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the IS NULL. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE test_expression IS [ NOT ] NULL ] [ GROUP BY ] [ HAVING search_condition ] [ ORDER BY order_expression [ ASC | DESC ] PURPOSE: IS... [Read More...]

IN – SQL Server Syntax Example: IN – T-SQL Example

IN – SQL Server Syntax Example: IN – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the IN. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE test_expression [ NOT ] IN ( subquery | expression [ ,…n ] ) ] [ GROUP BY ] [ HAVING search_condition ] [ ORDER BY order_expression [ ASC |... [Read More...]

HAVING – SQL Server Syntax Example: HAVING – T-SQL Example

HAVING – SQL Server Syntax Example: HAVING – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the HAVING. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE select_condition ] [ GROUP BY ] [ HAVING search_condition ] [ ORDER BY order_expression [ ASC | DESC ] PURPOSE: HAVING specifies search... [Read More...]

GROUP BY – SQL Server Syntax Example: GROUP BY – T-SQL Example

GROUP BY – SQL Server Syntax Example: GROUP BY – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the GROUP BY. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE select_condition ] [ GROUP BY ] [ HAVING search_condition ] [ ORDER BY order_expression [ ASC | DESC ] PURPOSE: Groups rows by... [Read More...]

EXISTS – SQL Server Syntax Example: EXISTS – T-SQL Example

EXISTS – SQL Server Syntax Example: EXISTS – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the EXISTS. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE EXISTS subquery ] [ GROUP BY ] [ HAVING search_condition ] [ ORDER BY order_expression [ ASC | DESC ] PURPOSE: EXISTS returns a boolean... [Read More...]

DISTINCT – SQL Server Syntax Example: DISTINCT – T-SQL Example

DISTINCT – SQL Server Syntax Example: DISTINCT – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the DISTINCT. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE search_condition AND search_condition ] [ GROUP BY ] [ HAVING search_condition ] [ ORDER BY order_expression [ ASC | DESC ] PURPOSE:... [Read More...]

DESC – SQL Server Syntax Example: DESC – T-SQL Example

DESC – SQL Server Syntax Example: DESC – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the DESC. SYNTAX: SELECT [ ALL | DISTINCT ] [TOP ( expression ) [PERCENT] [ WITH TIES ] ] column1 AS displayname1, displayname2 = column_name2, column_name3 displayname3 [ INTO new_table ] [ FROM { table_source } [ ,…n ] ] [ WHERE search_condition AND search_condition ] [ GROUP BY ] [ HAVING... [Read More...]

Date Calculation – SQL Server Syntax Example: Date Calculation – T-SQL Example

Date Calculation – SQL Server Syntax Example: Date Calculation – T-SQL Example Purpose: – Illustrates the SQL Server syntax for the Date Calculation. SYNTAX:DATEADD (datepart , number, date ) – Returns a specified date with the specified number interval (signed integer) added to a specified datepart of that date. * User-defined variables are valid for number and date can be an expression, column expression, user-defined variable,... [Read More...]

« Previous PageNext Page »