SQL Syntax
SQL When you want to do some operations on the data in the database, then you must have to write the query in the predefined syntax of SQL.
The syntax of the structured query language is a unique set of rules and guidelines, which is not case-sensitive. Its Syntax is defined and maintained by the ISO and ANSI standards.
Following are some most important points about the SQL syntax which are to remember:
- You can write the keywords of SQL in both uppercase and lowercase, but writing the SQL keywords in uppercase improves the readability of the SQL query.
- SQL statements or syntax are dependent on text lines. We can place a single SQL statement on one or multiple text lines.
- You can perform most of the action in a database with SQL statements.
- SQL syntax depends on relational algebra and tuple relational calculus.
SQL Statement
SQL statements tell the database what operation you want to perform on the structured data and what information you would like to access from the database.
The statements of SQL are very simple and easy to use and understand. They are like plain English but with a particular syntax.
Simple Example of SQL statement:
SELECT "column_name" FROM "table_name";
Each SQL statement begins with any of the SQL keywords and ends with the semicolon (;). The semicolon is used in the SQL for separating the multiple Sql statements which are going to execute in the same call. In this SQL tutorial, we will use the semicolon (;) at the end of each SQL query or statement.
- 1.Select Statement
- 2.Update Statement
- 3.Delete Statement
- 4.Create Table Statement
- 5.Alter Table Statement
- 6.Drop Table Statement
- 7.Create Database Statement
- 8.Drop Database Statement
- 9.Insert Into Statement
- 10.Truncate Table Statement
- 11.Describe Statement
- 12.Distinct Clause
- 13.Commit Statement
- 14.Rollback Statement
- 15.Create Index Statement
- 16.Drop Index Statement
- 17.Use Statement