SQL Syntax

SQL Statements :

Most of the actions you’ll need to do on a repository are finished with SQL statements.
The following SQL statement chooses all of the records in the “Consumers” table:

SELECT * FROM Customers;


Some repository techniques need a semicolon at the conclusion of each SQL statement.
Semicolon is the typical way to split up each SQL statement in repository techniques that enable multiple SQL statement to be executed in exactly the same contact to the server.
In that guide, we will use semicolon at the conclusion of each SQL statement.

Some of The Most Important SQL Commands :

  • SELECT – extracts information from a repository.
  • UPDATE – revisions information in a repository.
  • DELETE – deletes information from a repository.
  • INSERT INTO – positions new information right into a repository.
  • CREATE DATABASE – creates a new repository.
  • ALTER DATABASE – modifies a repository.
  • CREATE TABLE – creates a new dining table.
  • ALTER TABLE – modifies a desk.
  • DROP TABLE – deletes a desk.
  • CREATE INDEX – creates an list (search key).
  • DROP INDEX – deletes an list.

Introduction To SQL

What is SQL?

  • SQL represents Organized Question Language
  • SQL enables you to entry and change databases
  • SQL is definitely an ANSI (American National Criteria Institute) standard
SQL is a standard language for accessing and manipulating databases.

What Can SQL do?

  • SQL may implement queries against a database.
  • SQL may get data from a database.
  • SQL may place documents in a database.
  • SQL may update documents in a database.
  • SQL may erase documents from a database.
  • SQL can make new sources.
  • SQL can make new platforms in a database.
  • SQL can make located techniques in a database.
  • SQL can make views in a database.
  • SQL may collection permissions on platforms, techniques, and views.

Some of The Most Important SQL Commands :

  • SELECT – extracts knowledge from the repository.
  • UPDATE – changes knowledge in a repository.
  • DELETE – removes knowledge from the repository.
  • INSERT INTO – positions new knowledge into a repository.
  • CREATE DATABASE – produces a fresh repository.
  • ALTER DATABASE – modifies a repository.
  • CREATE TABLE – produces a fresh desk.
  • ALTER TABLE – modifies a dining table.
  • DROP TABLE – removes a dining table.
  • CREATE INDEX – produces an catalog.
  • DROP INDEX – removes an catalog.