SQL Common keywords (avoid using these as fields in table)

Source: Internet
Author: User
Tags create domain

Problem: Because the table table was built before, using the index as a field of tables, resulting in the project at run time, always error, prompting SQL syntax errors.

So deliberately searched for the common keywords of SQL. Avoid making the same mistakes.

--Statement function
--Data manipulation
SELECT--Retrieve data rows and columns from a database table
INSERT--Adds a new row of data to the database table
Delete--delete rows of data from a database table
Update-Updates data in a database table
--Data definition
CREATE table--Creating a database table
DROP table--delete tables from the database
ALTER TABLE--Modify the database table structure
Create View-Creates a view
Drop View-Delete a view from the database
Create index--creates an index for a database table
Drop INDEX--Remove the indexes from the database
Create PROCEDURE--Creating a stored procedure
Drop PROCEDURE--delete a stored procedure from the database
Create TRIGGER--creating a trigger
Drop TRIGGER--delete a trigger from the database
CREATE Schema--Add a new schema to the database
Drop schema--delete a schema from the database
Create domain--creating a data domain
Alter domain--change field definition
Drop domain--delete a field from the database
--Data control
Grant--Granting user access
Deny--Deny user access
REVOKE--Remove user access rights
--Transaction control
COMMIT--End the current transaction
ROLLBACK--Abort the current transaction
SET TRANSACTION--Define the current transactional data access characteristics
--Programmatic SQL
DECLARE--Setting cursors for queries
Explan--describing data access plans for queries
Open--Retrieving query results opens a cursor
FETCH--Retrieves a row of query results
Close--Closes the cursor
PREPARE-Preparing SQL statements for dynamic execution
Execute--Execute SQL statements Dynamically
DESCRIBE--Describe the prepared query
---local variables
DECLARE @id char (10)
--set @id = ' 10010001 '
Select @id = ' 10010001 '

---global variables
---must start with @@

SQL Common keywords (avoid using these as fields in table)

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.