Six SQL Commands

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:
  1. CREATE command (creates a new table)
    This command helps in creating the new database, new table, table view, and other objects of the database.
  2. UPDATE command (updates data in a database)
    This command helps in updating or changing the stored data in the database.
  3. 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.
  4. 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;
  5. DROP command (deletes a table)
    This command helps in deleting the entire table, table view, and other objects from the database.
  6. INSERT command (inserts new data into a database)
  1. DROP command (deletes a table)
    This command helps in deleting the entire table, table view, and other objects from the database.
  2. 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.

The Most Important Some of SQL Commands

SELECT – extracts data from a database
UPDATE – updates data in a database
DELETE – deletes data from a database
INSERT INTO – inserts new data into a database
CREATE DATABASE – creates a new database
ALTER DATABASE – modifies a database
CREATE TABLE – creates a new table
ALTER TABLE – modifies a table
DROP TABLE – deletes a table
CREATE INDEX – creates an index (search key)
DROP INDEX – deletes an index

© 2020 Spirituality