As we discussed earlier there are different types of statements in sql like select,insert,update,delete,create,drop,alter..etc we discuss them in deatil.
DQL-select
Select is used to view the already created table in the database.
DDL-
Create-Create is used to create a new table or a database
Alter-Alter is used to change the column(add,modify,drop) of the already created table.
Drop-Drop is used to delete all data and structures in the table.
Rename-Rename is used to change the name of the table
Truncate-Truncate removes all data from the table and release storage space.
difference between drop and truncate is dropdoes not release the storage space but truncate does.
DML-
Insert-Insert statement is used to add new rows to the table.
Update-Update statement is used to modify or update a current row in the table
Delete-Delete is used to remove the existing row from the table.
Merge-Merge is used to update or insert a row conditionally.in place of multiple insert or update statements we can use merge statement.
TCL-
Commit-
No comments:
Post a Comment