SQL is almost like simple English. It’s made up largely of English words, put together into strings of words that sound similar to English sentences.

The first word of each statement is its name, which is an action word (verb) that tells MySQL what you want to do. For example, CREATE, DROP, ALTER, SHOW, INSERT, LOAD, SELECT, UPDATE, and DELETE.

The statement name is followed by words and phrases that tell MySQL how to perform the action. For example,

SELECT lastName FROM Member

When a statement uses SELECT, it’s known as a query, because you are querying the database for information. This query retrieves all the last names stored in the table named Member.

Most Important SQL Statements

  1. SELECT - extracts data from a database
  2. UPDATE - updates data in a database
  3. DELETE - deletes data from a database
  4. INSERT INTO - inserts new data into a database
  5. CREATE DATABASE - creates a new database
  6. ALTER DATABASE - modifies a database
  7. CREATE TABLE - creates a new table
  8. ALTER TABLE - modifies a table
  9. DROP TABLE - deletes a table
  10. CREATE INDEX - creates an index (search key)
  11. DROP INDEX - deletes an index