Basic Introduction of SQL & MySql
SQL is declarative language-
* Main component of SQL syntax:
1: DDL(Data defination Language);
2: DML(Data Manipulation language);
3: DCL(Data Control Language);
4: TCL(Transaction control language)
#DDL : A set of statement that allow the user to define or modify data structures and objects, such as tables.It contains - CREATE , ALTER , DROP , RENAME , TRUNCATE methods.
*note: Keywords are the reserved word in sql like : CREATE , ALTER,ADD .and we do not use that word to assign the object_name.
#DML : Its statement allow us to manipulate the data in the tables of a database.
It contains : SELECT , INSERT , UPDATE , DELETE statement(methods)
#DCL : It contains the following statement : GRANT & REVOKE. allow us to manage the rights users have in a database
The REVOKE clause : used to revoke the permissions and privileges of database users. It exact opposite of GRANT though the syntax are same.
#TCL : Not every change you make to a database is saved automatically. It contains :
COMMIT : saves the changes in the database , changes can not be undone.
ROLLBACK : Allows you to take a step back.
the last changes made will not be count
reverts to the last non-commited state
Comments
Post a Comment