Table of Contents
SQL Reserved Words - SQL Keywords
Return to SQL Glossary, Reserved Words, SQL, SQL Libraries, SQL Syntax, SQL Data Structures, SQL Algorithms, SQL Development Tools, SQL DevOps - SQL SRE - SQL CI/CD, Cloud Native SQL - SQL Microservices - Serverless SQL, SQL Security - SQL DevSecOps, Functional SQL, SQL Concurrency, SQL Data Science - SQL and Databases, SQL Machine Learning, SQL Topics, Awesome SQL
Also called: SQL Language Keywords, SQL Reserved Keywords, SQL Keywords, SQL Reserved Identifiers, SQL Reserved words
Provide a list of Reserved Words in SQL. Answer in MediaWiki syntax with the URL of the official documentation for each language reference.
SQL (Structured Query Language) is standardized by the ANSI (American National Standards Institute) and ISO (International Organization for Standardization), but it's important to note that various database management systems (DBMS) like MySQL, PostgreSQL, Oracle Database, SQL Server, IBM Db2, etc., might have additional SQL reserved words specific to their SQL implementation. Below is a list of common SQL reserved words that are generally recognized across most implementations of SQL. For comprehensive and specific lists, it's recommended to consult the SQL documentation of the specific dialect of SQL you're using. This list provides a general overview and includes a link to the SQL-2016 standard documentation for SQL reference.
SQL Reserved Words
This list includes common SQL reserved words that are widely recognized across various SQL database systems. These keywords are part of the SQL standard and have special meanings in SQL statements. For a complete and detailed list, please refer to the documentation of the specific SQL dialect you are using.
- SELECT - Used to select data from a database.
- FROM - Specifies the table to select or delete data from.
- WHERE - Used to filter records.
- INSERT INTO - Used to insert new records into a table.
- UPDATE - Used to modify existing records.
- DELETE - Used to delete records from a table.
- CREATE TABLE - Used to create a new table.
- ALTER TABLE - Used to modify an existing table structure.
- DROP TABLE - Used to delete a table.
- CREATE INDEX - Used to create an index on a table.
- DROP INDEX - Used to delete an index.
- JOIN - Used to join tables.
- INNER JOIN - Returns records that have matching values in both tables.
- LEFT JOIN - Returns all records from the left table, and matched records from the right table.
- RIGHT JOIN - Returns all records from the right table, and matched records from the left table.
- FULL JOIN - Returns all records when there is a match in either left or right table.
- UNION - Used to combine the result sets of two or more SELECT statements.
- GROUP BY - Used to group rows that have the same values in specified columns into summary rows.
- ORDER BY - Used to sort the result set.
- HAVING - Used to filter records that work on summarized GROUP BY results.
- BEGIN TRANSACTION - Starts a transaction.
- COMMIT - Commits the current transaction.
- ROLLBACK - Rolls back the current transaction.
- SAVEPOINT - Sets a savepoint within a transaction.
- LOCK TABLE - Used to lock one or more tables in a specified mode.
- GRANT - Used to give privileges to users.
- REVOKE - Used to take back privileges granted to users.
For a detailed and authoritative list of reserved words in SQL, it's best to consult the official documentation of the SQL standard and the documentation of the specific SQL database you are using. The SQL:2016 standard can be a good reference point for understanding the core SQL reserved words: https://www.iso.org/standard/63555.html ISO/IEC 9075-2:2016 - https://www.iso.org/standard/76583.html
Please note, access to the full text of the standard may require purchase or subscription.
This list provides a foundational understanding of SQL reserved words. Given the variations and extensions provided by different SQL dialects, always refer to the specific documentation of your database system for the most accurate and detailed information.
SQL Reserved Words
SQL Reserved Words
SQL is a language made up of keywords—special words that are used in performing SQL operations. Special care must be taken to not use these keywords when naming databases, tables, columns, and any other database objects. Thus, these keywords are considered reserved.
This is a list of the more common reserved words found in major DBMSs. Please note the following:
Image Keywords tend to be very DBMS-specific, and not all the keywords that follow are used by all DBMSs.
Image Many DBMSs have extended the list of SQL reserved words to include terms specific to their implementations. Most DBMS-specific keywords are not listed in the following list.
Image To ensure future compatibility and portability, it is a good idea to avoid any and all reserved words, even those not reserved by your own DBMS.
ABORT
ABSOLUTE
ACTION
ACTIVE
ADD
AFTER
ALL
ALLOCATE
ALTER
ANALYZE
AND
ANY
ARE
AS
ASC
ASCENDING
ASSERTION
AT
AUTHORIZATION
AUTO
AUTO-INCREMENT
AUTOINC
AVG
BACKUP
BEFORE
BEGIN
BETWEEN
BIGINT
BINARY
BIT
BLOB
BOOLEAN
BOTH
BREAK
BROWSE
BULK
BY
BYTES
CACHE
CALL
CASCADE
CASCADED
CASE
CAST
CATALOG
CHANGE
CHAR
CHARACTER
CHARACTER_LENGTH
CHECK
CHECKPOINT
CLOSE
CLUSTER
CLUSTERED
COALESCE
COLLATE
COLUMN
COLUMNS
COMMENT
COMMIT
COMMITTED
COMPUTE
COMPUTED
CONDITIONAL
CONFIRM
CONNECT
CONNECTION
CONSTRAINT
CONSTRAINTS
CONTAINING
CONTAINS
CONTAINSTABLE
CONTINUE
CONTROLROW
CONVERT
COPY
COUNT
CREATE
CROSS
CSTRING
CUBE
CURRENT
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_USER
CURSOR
DATABASE
DATABASES
DATE
DATETIME
DAY
DBCC
DEALLOCATE
DEBUG
DEC
DECIMAL
DECLARE
DEFAULT
DELETE
DENY
DESC
DESCENDING
DESCRIBE
DISCONNECT
DISK
DISTINCT
DISTRIBUTED
DIV
DO
DOMAIN
DOUBLE
DROP
DUMMY
DUMP
ELSE
ELSEIF
ENCLOSED
END
ERRLVL
ERROREXIT
ESCAPE
ESCAPED
EXCEPT
EXCEPTION
EXEC
EXECUTE
EXISTS
EXIT
EXPLAIN
EXTEND
EXTERNAL
EXTRACT
FALSE
FETCH
FIELD
FIELDS
FILE
FILLFACTOR
FILTER
FLOAT
FLOPPY
FOR
FORCE
FOREIGN
FOUND
FREETEXT
FREETEXTTABLE
FROM
FULL
FUNCTION
GENERATOR
GET
GLOBAL
GO
GOTO
GRANT
GROUP
HAVING
HOLDLOCK
HOUR
IDENTITY
IF
IN
INACTIVE
INDEX
INDICATOR
INFILE
INNER
INOUT
INPUT
INSENSITIVE
INSERT
INT
INTEGER
INTERSECT
INTERVAL
INTO
IS
ISOLATION
JOIN
KEY
KILL
LANGUAGE
LAST
LEADING
LEFT
LENGTH
LEVEL
LIKE
LIMIT
LINENO
LINES
LISTEN
LOAD
LOCAL
LOCK
LOGFILE
LONG
LOWER
MANUAL
MATCH
MAX
MERGE
MESSAGE
MIN
MINUTE
MIRROREXIT
MODULE
MONEY
MONTH
MOVE
NAMES
NATIONAL
NATURAL
NCHAR
NEXT
NEW
NO
NOCHECK
NONCLUSTERED
NONE
NOT
NULL
NULLIF
NUMERIC
OF
OFF
OFFSET
OFFSETS
ON
ONCE
ONLY
OPEN
OPTION
OR
ORDER
OUTER
OUTPUT
OVER
OVERFLOW
OVERLAPS
PAD
PAGE
PAGES
PARAMETER
PARTIAL
PASSWORD
PERCENT
PERM
PERMANENT
PIPE
PLAN
POSITION
PRECISION
PREPARE
PRIMARY
PRIOR
PRIVILEGES
PROC
PROCEDURE
PROCESSEXIT
PROTECTED
PUBLIC
PURGE
RAISERROR
READ
READTEXT
REAL
REFERENCES
REGEXP
RELATIVE
RENAME
REPEAT
REPLACE
REPLICATION
REQUIRE
RESERV
RESERVING
RESET
RESTORE
RESTRICT
RETAIN
RETURN
RETURNS
REVOKE
RIGHT
ROLLBACK
ROLLUP
ROWCOUNT
RULE
SAVE
SAVEPOINT
SCHEMA
SECOND
SECTION
SEGMENT
SELECT
SENSITIVE
SEPARATOR
SEQUENCE
SESSION_USER
SET
SETUSER
SHADOW
SHARED
SHOW
SHUTDOWN
SINGULAR
SIZE
SMALLINT
SNAPSHOT
SOME
SORT
SPACE
SQL
SQLCODE
SQLERROR
STABILITY
STARTING
STARTS
STATISTICS
SUBSTRING
SUM
SUSPEND
TABLE
TABLES
TEMP
TEMPORARY
TEXT
TEXTSIZE
THEN
TIME
TIMESTAMP
TO
TOP
TRAILING
TRAN
TRANSACTION
TRANSLATE
TRIGGER
TRIM
TRUE
TRUNCATE
TYPE
UNCOMMITTED
UNION
UNIQUE
UNTIL
UPDATE
UPDATETEXT
UPPER
USAGE
USE
USER
USING
VALUE
VALUES
VARCHAR
VARIABLE
VARYING
VERBOSE
VIEW
VOLUME
WAIT
WAITFOR
WHEN
WHERE
WHILE
WITH
WORK
WRITE
WRITETEXT
XOR
YEAR
ZONE
Fair Use Source: Sams Teach Yourself SQL in 10 Minutes a Day, 5th Edition
- Snippet from Wikipedia: SQL
Structured Query Language (SQL) (pronounced S-Q-L; or alternatively as "sequel") is a domain-specific language used to manage data, especially in a relational database management system (RDBMS). It is particularly useful in handling structured data, i.e., data incorporating relations among entities and variables.
Introduced in the 1970s, SQL offered two main advantages over older read–write APIs such as ISAM or VSAM. Firstly, it introduced the concept of accessing many records with one single command. Secondly, it eliminates the need to specify how to reach a record, i.e., with or without an index.
Originally based upon relational algebra and tuple relational calculus, SQL consists of many types of statements, which may be informally classed as sublanguages, commonly: Data query Language (DQL), Data Definition Language (DDL), Data Control Language (DCL), and Data Manipulation Language (DML).
The scope of SQL includes data query, data manipulation (insert, update, and delete), data definition (schema creation and modification), and data access control. Although SQL is essentially a declarative language (4GL), it also includes procedural elements.
SQL was one of the first commercial languages to use Edgar F. Codd's relational model. The model was described in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks". Despite not entirely adhering to the relational model as described by Codd, SQL became the most widely used database language.
SQL became a standard of the American National Standards Institute (ANSI) in 1986 and of the International Organization for Standardization (ISO) in 1987. Since then, the standard has been revised multiple times to include a larger set of features and incorporate common extensions. Despite the existence of standards, virtually no implementations in existence adhere to it fully, and most SQL code requires at least some changes before being ported to different database systems.
Research More
- SQL Reserved Words on SQL Docs
- SQL on Amazon.com
- SQL on w3schools.com
- SQL on Hacker Noon
- SQL on Wikipedia.org
SQL on the Cloud
- SQL on VMware.com
SQL on Containers
- SQL on Kubernetes.io
- SQL on Docker.com
SQL Courses
Fair Use Source
- SQL for Archive Access for Fair Use Preservation, quoting, paraphrasing, excerpting and/or commenting upon
SQL: SQL Fundamentals, SQL Inventor - SQL Language Designer: Donald D. Chamberlin and Raymond F. Boyce from IBM San Jose Research Laboratory in 1974 after learning about the relational model from Edgar F. Codd; SQL DevOps - SQL SRE, Cloud Native SQL (SQL on Kubernetes - SQL on AWS - SQL on Azure - SQL on GCP - SQL on Mainframe), SQL Microservices, SQL Containerization (SQL Docker - SQL on Docker Hub), Serverless SQL, SQL Data Science - SQL DataOps - SQL and Databases (SQL ORM), SQL ML - SQL DL, Database - Database Fundamentals, Relational Databases (Oracle Database, MySQL, SQL Server (T-SQL - Transact-SQL), PostgreSQL, IBM Db2, Azure SQL Database, Snowflake, Google BigQuery, Google BigTable, SQLite), Functional SQL (1. SQL Immutability, 2. SQL Purity - SQL No Side-Effects, 3. SQL First-Class Functions - SQL Higher-Order Functions, SQL Lambdas - SQL Anonymous Functions - SQL Closures, SQL Lazy Evaluation, 4. SQL Recursion), Reactive SQL), SQL Concurrency SQL and ACID - SQL Parallel Programming - Async SQL, SQL Networking, SQL Security - SQL DevSecOps - SQL OAuth, SQL Memory Allocation (SQL Heap - SQL Stack - SQL Garbage Collection), SQL CI/CD - SQL Dependency Management - SQL DI - SQL IoC - SQL Build Pipeline, SQL Automation - SQL Scripting, SQL Package Managers, SQL Modules - SQL Packages, SQL Installation (SQL Windows - Chocolatey SQL, SQL macOS - Homebrew SQL, SQL on Linux), SQL Configuration, SQL Observability (SQL Monitoring, SQL Performance - SQL Logging), SQL Language Spec - SQL RFCs - SQL Roadmap, SQL Keywords, SQL Operators, SQL Functions, SQL Data Structures - SQL Algorithms, SQL Syntax, SQL OOP (1. SQL Encapsulation - 2. SQL Inheritance - 3. SQL Polymorphism - 4. SQL Abstraction), SQL Design Patterns - SQL Best Practices - SQL Style Guide - Clean SQL - SQL BDD, SQL Generics, SQL I/O, SQL Serialization - SQL Deserialization, SQL APIs, SQL REST - SQL JSON - SQL GraphQL, SQL gRPC, SQL Virtualization, SQL Development Tools: SQL SDK, SQL Compiler - SQL Transpiler, SQL Interpreter - SQL REPL, SQL IDEs - Database IDEs (JetBrains DataSpell, SQL Server Management Studio, MySQL Workbench, Oracle SQL Developer, SQLiteStudio, JetBrains SQL, SQL Visual Studio Code), SQL Linter, SQL Community - SQLaceans - SQL User, SQL Standard Library - SQL Libraries - SQL Frameworks, SQL Testing - SQL TDD, SQL History, SQL Research, SQL Topics, SQL Uses - List of SQL Software - Written in SQL - SQL Popularity, SQL Bibliography - Manning SQL Series - Manning Data Science Series - SQL Courses, SQL Glossary - SQL Official Glossary, SQL GitHub, Awesome SQL. (navbar_sql and navbar_database)
Reserved Words: Programming Language Keywords, aka Reserved Identifiers. (navbar_reserved_words - see also navbar_programming)
© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers
SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.