SQL commands are lines of SQL code that ask the SQL application to perform simple tasks against with data inside of a database. Often we refer to commands as query statements or scripts; all of these terms are synonymous. Most of the commands and statements you will see in this tutorial are fairly standard and will work across multiple database applications despite the fact this tutorial is aimed for the SQL Server Express user.
SQL commands are instructions, coded into SQL statements, which are used to communicate with the database to perform specific tasks, work, functions and queries with data.
SQL commands can be used not only for searching the database but also to perform various other functions like, for example, you can create tables, add data to tables, or modify data, drop the table, set permissions for users. SQL commands are grouped into four major categories depending on their functionality:
Data Definition Language (DDL) - These SQL commands are used for creating, modifying, and dropping the structure of database objects. The commands are CREATE, ALTER, DROP, RENAME, and TRUNCATE.
Foe Example Create table Student
(
Id int,
Name varchar(20),
Address varchar(50)
)
Data Manipulation Language (DML) - These SQL commands are used for storing, retrieving, modifying, and deleting data.
These Data Manipulation Language commands are:SELECT, INSERT, UPDATE, and DELETE.
For Example
SELECT "column_name" FROM "table_name";
Transaction Control Language (TCL) - These SQL commands are used for managing changes affecting the data. These commands are COMMIT, ROLLBACK, and SAVEPOINT
tran
Update table student set name='Dev' where Id =1
commit
Data Control Language (DCL) - These SQL commands are used for providing security to database objects. These commands are GRANT and REVOKE.
SQL commands are instructions, coded into SQL statements, which are used to communicate with the database to perform specific tasks, work, functions and queries with data.
SQL commands can be used not only for searching the database but also to perform various other functions like, for example, you can create tables, add data to tables, or modify data, drop the table, set permissions for users. SQL commands are grouped into four major categories depending on their functionality:
Data Definition Language (DDL) - These SQL commands are used for creating, modifying, and dropping the structure of database objects. The commands are CREATE, ALTER, DROP, RENAME, and TRUNCATE.
Foe Example Create table Student
(
Id int,
Name varchar(20),
Address varchar(50)
)
Data Manipulation Language (DML) - These SQL commands are used for storing, retrieving, modifying, and deleting data.
These Data Manipulation Language commands are:SELECT, INSERT, UPDATE, and DELETE.
For Example
SELECT "column_name" FROM "table_name";
Transaction Control Language (TCL) - These SQL commands are used for managing changes affecting the data. These commands are COMMIT, ROLLBACK, and SAVEPOINT
tran
Update table student set name='Dev' where Id =1
commit
Data Control Language (DCL) - These SQL commands are used for providing security to database objects. These commands are GRANT and REVOKE.
No comments :
Post a Comment