The SQL commands help in creating, updating, deleting, selecting, doping, inserting and managing the database. The most six common SQL commands which are highly used are mentioned below:
- CREATE command (creates a new table)
This command helps in creating the new database, new table, table view, and other objects of the database. - UPDATE command (updates data in a database)
This command helps in updating or changing the stored data in the database. - DELETE command {deletes data from a database}
This command helps in removing or erasing the saved records from the database tables. It erases single or multiple tuples from the tables of the database. - SELECT command (extracts data from a database)
This command helps in accessing the single or multiple rows from one or multiple tables of the database. We can also use this command with the WHERE clause.
ex: Select * from table_name and
SELECT column1, column2, ..FROM table_name;
SELECT CustomerName, City FROM Customers; - DROP command (deletes a table)
This command helps in deleting the entire table, table view, and other objects from the database. - INSERT command (inserts new data into a database)
- DROP command (deletes a table)
This command helps in deleting the entire table, table view, and other objects from the database. - INSERT command (inserts new data into a database)
This command helps in inserting the data or records into the database tables. We can easily insert the records in single as well as multiple rows of the table.