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)