Types of SQL Commands
Type of SQL statements are divided into five different categories: Data definition language (DDL) Data manipulation language (DML), Data Control Language (DCL), Transaction Control Statement (TCS), Session Control Statements (SCS). DDL:(Create,Alter,Drop,Truncate,Rename) Statement Description CREATE Create new database/table. ALTER Modifies the structure of database/table. DROP Deletes a database/table. TRUNCATE Remove all table records including allocated table spaces. RENAME Rename the database/table. DML:(Insert,Update,Delete,Merge,Lock Table,Call Explain Plan) Statement Description SELECT Retrieve data from the table. INSERT Insert data into a table. UPDATE Updates existing data with new data within a table. DELETE Deletes the records rows from the table. MERGE MERGE (also called UPSERT) statements to INSERT new records or UPDATE existing records depending on condition matches or not. LOCK TABLE LOCK TABLE statement to lock one or more table