SQL Syntax
- 01:54
What are the main SQL Syntax rules to be followed
Downloads
Transcript
There are certain rules that we need to follow when writing queries to access data from databases and skill.
These rules are called the SQ and tax rules.
So firstly, SQL statements are not case sensitive.
So for example, when we are trying to access a certain column from a database, we tend to use the select statement.
So writing the select statement with all lowercase letters or even all uppercase letters will not make any difference.
But in terms of the formatting perspective, it is always good to have all uppercase letters.
Some database management systems require a semicolon at the end of the statement.
So for example, if we are trying to access a certain column called B from A dataset called A, so we tend to write, sell it B from A.
Once we complete the statement.
It's always good to have a semicolon at the end of it, and even the or Oracle SQL deliverer requires the semicolon at the end of the statements.
We did have a look in our previous videos at the select from and where statements there are some other important statements such as sell, which we already had a look at. Furthermore, update, delete insert, which mainly looks at updating, deleting, and inserting data into the databases.
And we also have the create database and the alter database, which on a whole just creates a new database and also modifies a database.
We also have the create table, all the table and drop table, which respectively looks at creating a new table, modifying the table and deleting the table.
And finally, we do have the create index and the drop index, which simply looks at creating an index and deleting an index.
There are many more statements and it's not limiting to what we are looking at here.