SQL Syntax Preliminary (case, semicolon, DML, DDL)

Source: Internet
Author: User

SQL is not case sensitive

Semicolon after the SQL statement?

Some database systems require semicolons to be used at the end of each SQL command, and some databases do not require

Semicolons are the standard way to separate each SQL statement in the database system so that more than one statement can be executed in the same request to the server

If you are using MS Access and SQL Server 2000, you do not need to use semicolons after each SQL statement, but some database software requirements must use semicolons

SQL DML and DDL

SQL can be divided into two parts: Data manipulation Language (DML) and data definition language (DDL)

SQL (Structured Query language) is the syntax for executing queries. But the SQL language also contains syntax for updating, inserting, and deleting records

  Query and update quality 0 forms the DML portion of SQL:

1) SELECT-get data from the database

2) Update-Updates the data in the database table

3) Delete-delete data from the database

4) insert into-inserts data into the database table

The Data definition language (DDL) portion of SQL gives us the ability to create or delete tables. We can also define indexes (keys), specify links between tables, and impose constraints between tables

The most important DDL statement in SQL:

1) Create database-Creates new databases

2) ALTER DATABASE-Modify databases

3) CREATE table-Creates a new table

4) ALTER TABLE-Change (change) database table

5) drop table-delete tables

6) CREATE index-Creating indexes (search key)

7) Drop INDEX-Delete indexes

SQL Syntax Preliminary (case, semicolon, DML, DDL)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.