0% found this document useful (0 votes)
7 views1 page

Various Syntax in SQL

22

Uploaded by

PT A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Various Syntax in SQL

22

Uploaded by

PT A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

SQL

4. SQL – Syntax

SQL is followed by a unique set of rules and guidelines called Syntax. This tutorial gives
you a quick start with SQL by listing all the basic SQL Syntax.

All the SQL statements start with any of the keywords like SELECT, INSERT, UPDATE,
DELETE, ALTER, DROP, CREATE, USE, SHOW and all the statements end with a semicolon
(;).

The most important point to be noted here is that SQL is case insensitive, which means
SELECT and select have same meaning in SQL statements. Whereas, MySQL makes
difference in table names. So, if you are working with MySQL, then you need to give table
names as they exist in the database.

Various Syntax in SQL


All the examples given in this tutorial have been tested with a MySQL server.

SQL SELECT Statement

SELECT column1, column2....columnN


FROM table_name;

SQL DISTINCT Clause

SELECT DISTINCT column1, column2....columnN


FROM table_name;

SQL WHERE Clause

SELECT column1, column2....columnN


FROM table_name
WHERE CONDITION;

SQL AND/OR Clause

SELECT column1, column2....columnN


FROM table_name
WHERE CONDITION-1 {AND|OR} CONDITION-2;

17

You might also like