Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

MySQL SQL

What is SQL?

SQL is the standardized language for interacting with Relational Databases, enabling operations such as insertion, searching, updating, and deletion of database records.

How to Use SQL

The SQL statement below retrieves all records from the “Customers” table:

Example

SELECT * FROM Customers;

Keep in Mind That…

SQL keywords are case-insensitive, meaning “select” is treated the same as “SELECT”.

However, for consistency, this tutorial will use SQL keywords in upper-case.

Semicolon after SQL Statements?

In some database systems, a semicolon is necessary at the end of each SQL statement.

It serves as the standard delimiter for separating multiple SQL statements within a single server call.

Throughout this tutorial, we will ensure to include a semicolon at the end of each SQL statement.

Some of The Most Important SQL Commands

  • SELECT: Retrieves data from a database.
  • UPDATE: Modifies existing data in a database.
  • DELETE: Removes data from a database.
  • INSERT INTO: Adds new data into a database.
  • CREATE DATABASE: Establishes a new database.
  • ALTER DATABASE: Adjusts an existing database.
  • CREATE TABLE: Generates a new table.
  • ALTER TABLE: Modifies an existing table.
  • DROP TABLE: Deletes a table from a database.
  • CREATE INDEX: Establishes an index for efficient searching.
  • DROP INDEX: Removes an index.