English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The SQL keyword大全速查 has compiled the commonly used reserved keywords in SQL, such as ADD, DROP TABLE, ALTER TABLE, JOIN, UPDATE, DELETE, INSERT INTO, SELECT, WHERE, GROUP BY, etc., with usage methods and example descriptions, hoping to help everyone learn SQL language.
The SQL keyword reference includes reserved keywords in SQL.
Method | Description |
---|---|
ADD | Add a column to an existing table |
ADD CONSTRAINT | Add constraints after the table is created |
ALTER | Add, delete, or modify columns in the table, or change the data type of columns in the table |
ALTER COLUMN | Change the data type of a column in the table |
ALTER TABLE | Add, delete, or modify columns in the table |
ALL | Return true if all subquery values meet the condition |
AND | Only contain rows where both conditions are true |
ANY | Return true if any subquery value meets the condition |
AS | Rename a column or table with an alias |
ASC | Sort the result set in ascending order |
BACKUP DATABASE | Create a backup of the existing database |
BETWEEN | Select values within a given range |
CASE | Create different outputs based on conditions |
CHECK | Constraint that limits the values that can be placed in a column |
COLUMN | Change the data type of a column or delete a column from the table |
CONSTRAINT | Add or delete constraints |
CREATE | Create a database, index, view, table, or procedure |
CREATE DATABASE | Create a new SQL database |
CREATE INDEX | Create an index on the table (allowing duplicate values) |
CREATE OR REPLACE VIEW | Update the view |
CREATE TABLE | Create a new table in the database |
CREATE PROCEDURE | Create a stored procedure |
CREATE UNIQUE INDEX | Create a unique index (no duplicate values) on the table |
CREATE VIEW | Create a view based on the result set of the SELECT statement |
DATABASE | Create or delete an SQL database |
DEFAULT | A constraint that provides a default value for the column |
DELETE | Delete rows from the table |
DESC | Sort the result set in descending order |
DISTINCT | Only select different (different) values |
DROP | Drop a column, constraint, database, index, table, or view |
DROP COLUMN | Drop a column in the table |
DROP CONSTRAINT | Drop UNIQUE, PRIMARY KEY, FOREIGN KEY, or CHECK constraints |
DROP DATABASE | Drop the existing SQL database |
DROP DEFAULT | Drop the default constraint |
DROP INDEX | Drop the index in the table |
DROP TABLE | Drop the existing table in the database |
DROP VIEW | Drop the view |
EXEC | Execute the stored procedure |
EXISTS | Test if there are any records in the subquery |
FOREIGN KEY | A constraint used to link two tables with a key |
FROM | Specify the table from which to select or delete data |
FULL OUTER JOIN | Return all rows when there are matching items in the left table or right table |
GROUP BY | Group the result set (used with aggregate functions: COUNT, MAX, MIN, SUM, AVG) |
HAVING | Use the summary function instead of WHERE |
IN | Allow you to specify multiple values in the WHERE clause |
INDEX | Create or delete an index in the table |
INNER JOIN | Return rows with matching values in both tables |
INSERT INTO | Insert a new row into the table |
INSERT INTO SELECT | Copy data from one table to another |
IS NULL | Test null values |
IS NOT NULL | Test non-null values |
JOIN | Join table |
LEFT JOIN | Return all rows in the left table, as well as matching rows in the right table |
LIKE | Search for a specified pattern in the column |
LIMIT | Specify the number of records to return in the result set |
NOT | Only include rows where the condition is not true |
NOT NULL | Enforce a constraint that the column does not accept NULL values |
OR | Include rows where any condition is true |
ORDER BY | Sort the result set in ascending or descending order |
OUTER JOIN | Return all rows when there are matching items in the left table or right table |
PRIMARY KEY | A constraint that uniquely identifies each record in a database table |
PROCEDURE | Stored procedure |
RIGHT JOIN | Return all rows in the right table, as well as matching rows in the left table |
ROWNUM | Specify the number of records to return in the result set |
SELECT | Select data from the database |
SELECT DISTINCT | Only select different (different) values |
SELECT INTO | Copy data from one table to a new table |
SELECT TOP | Specify the number of records to return in the result set |
SET | Specify the columns and values to be updated in the table |
TABLE | Create a table, or add, delete, or modify columns in the table, or delete the table or data in the table |
TOP | Specify the number of records to return in the result set |
TRUNCATE TABLE | Delete data from the table without deleting the table itself |
UNION | Merge the results of two or more SELECT statements (only different values) |
UNION ALL | Merge the results of two or more SELECT statements (allows duplicate values) |
UNIQUE | A constraint that ensures all values in the column are unique |
UPDATE | Update existing rows in the table |
VALUES | Specify the values for the INSERT INTO statement |
VIEW | Create, update, or delete a view |
WHERE | Filter the result set to include only records that meet the specified conditions |