This article will feed you with knowledge on the topic Introduction to SQL. SQL stands for Structured Query Language and pronounced as “Sequel”. Database is accessed using SQL statement, which is an ANSI (American National Standards Institute) standard”. SQL is used to create and query databases i.e. creating, storing, accessing and manipulating the data. Due to its loose structure and flexibility, SQL is considered as a handy tool for building dynamic web applications.
Features of SQL :-
- SQL stands for Structured Query Language and is used to communicate with databases.
- SQL is NOT case sensitive i.e. SELECT is the same as select.
- SQL is efficient, easy to use and learn.
- SQL is used to create new databases.
- SQL is used to create new tables in a database.
- SQL is used to create views, stored procedures and functions in a database.
- SQL is used to drop tables and databases.
- SQL is used to execute queries and retrieve data from a database.
- SQL is used to insert, delete and update records in a database.
- SQL is used to set permissions on tables, procedures, and views.
SQL Commands :-
|Insert||Data Manipulation Language (DML)||Add new rows (records).|
|Update||Modifies the existing rows in a table.|
|Delete||Delete the rows from a table.|
|Merge||Merge rows from the tables.|
|Create||Data Definition Language (DDL)||Creates a new table, a view of a table, or other object in database.|
|Alter||Modifies an existing database object, such as a table.|
|Drop||Deletes an entire table, a view of a table or other object in the database.|
|Truncate||Removes all rows from a table as well as data storage space used by that table.|
|Rename||Rename a table.|
|Commit||Transaction Control Language (TCL)||Commits the changes made by DML.|
|Rollback||Rollback the changes made by DML.|
|Savepoint||Create a check point.|
|Grant||Data Control Language (DCL)||Gives a privilege to user.|
|Revoke||Takes back privileges granted from user|
|Select||Data Query Language (DQL)||Retrievesrecords from one or more tables.|
Basic Data Types in SQL are :-