先放上特殊的字符
- Backtick Symbol - ` 反引号 同撇
- Double Quotes - " 双引号
- Square Brackets - [ 中括号
如
CREATE TABLE tst1 ([value] INT); CREATE TABLE tst2 (`value` INT); CREATE TABLE tst3 ("value" INT);
如果没有转义的话 报如下错误
然后是关键字
ABSOLUTE |
ACTION |
ADD |
ADD_MONTHS |
AFTER |
ALL |
ALLOCATE |
ALTER |
AND |
ANY |
ARE |
AS |
ASC |
ASSERTION |
AT |
ATTACH |
ATTRIBUTE |
AVG |
BEFORE |
BETWEEN |
BIGINT |
BIT |
BIT_LENGTH |
BLOB |
BOOLEAN |
BOTH |
BREADTH |
BY |
||
CALL |
CASCADE |
CASCADED |
CASE |
CAST |
CATALOG |
CHANGE |
CHAR |
CHARACTER |
CHECK |
CLASS |
CLASSES |
CLOB |
CLOSE |
COALESCE |
COLLATE |
COLLATION |
COLUMN |
COMMIT |
CONNECT |
CONNECT_BY_ISCYCLE |
CONNECT_BY_ISLEAF |
CONNECT_BY_ROOT |
CONNECTION |
CONSTRAINT |
CONSTRAINTS |
CONTINUE |
CONVERT |
CORRESPONDING |
COUNT |
CREATE |
CROSS |
CURRENT |
CURRENT_DATE |
CURRENT_DATETIME |
CURRENT_TIME |
CURRENT_TIMESTAMP |
CURRENT_USER |
CURSOR |
CYCLE |
||
DATA |
DATA_TYPE |
DATABASE |
DATE |
DATETIME |
DAY |
DAY_HOUR |
DAY_MILLISECOND |
DAY_MINUTE |
DAY_SECOND |
DEALLOCATE |
DEC |
DECIMAL |
DECLARE |
DEFAULT |
DEFERRABLE |
DEFERRED |
DELETE |
DEPTH |
DESC |
DESCRIBE |
DESCRIPTOR |
DIAGNOSTICS |
DIFFERENCE |
DISCONNECT |
DISTINCT |
DISTINCTROW |
DIV |
DO |
DOMAIN |
DOUBLE |
DUPLICATE |
DROP |
EACH |
ELSE |
ELSEIF |
END |
EQUALS |
ESCAPE |
EVALUATE |
EXCEPT |
EXCEPTION |
EXEC |
EXECUTE |
EXISTS |
EXTERNAL |
EXTRACT |
|
FALSE |
FETCH |
FILE |
FIRST |
FLOAT |
FOR |
FOREIGN |
FOUND |
FROM |
FULL |
FUNCTION |
|
GENERAL |
GET |
GLOBAL |
GO |
GOTO |
GRANT |
GROUP |
||
HAVING |
HOUR |
HOUR_MILLISECOND |
HOUR_MINUTE |
HOUR_SECOND |
|
IDENTITY |
IF |
IGNORE |
IMMEDIATE |
IN |
INDEX |
INDICATOR |
INHERIT |
INITIALLY |
INNER |
INOUT |
INPUT |
INSERT |
INT |
INTEGER |
INTERSECT |
INTERSECTION |
INTERVAL |
INTO |
IS |
ISOLATION |
JOIN |
||
KEY |
||
LANGUAGE |
LAST |
LEADING |
LEAVE |
LEFT |
LESS |
LEVEL |
LIKE |
LIMIT |
LIST |
LOCAL |
LOCAL_TRANSACTION_ID |
LOCALTIME |
LOCALTIMESTAMP |
LOOP |
LOWER |
||
MATCH |
MAX |
METHOD |
MILLISECOND |
MIN |
MINUTE |
MINUTE_MILLISECOND |
MINUTE_SECOND |
MOD |
MODIFY |
MODULE |
MONETARY |
MONTH |
MULTISET |
MULTISET_OF |
NA |
NAMES |
NATIONAL |
NATURAL |
NCHAR |
NEXT |
NO |
NONE |
NOT |
NULL |
NULLIF |
NUMERIC |
OBJECT |
OCTET_LENGTH |
OF |
OFF |
ON |
ONLY |
OPEN |
OPTIMIZATION |
OPTION |
OR |
ORDER |
OUT |
OUTER |
OUTPUT |
OVERLAPS |
PARAMETERS |
PARTIAL |
POSITION |
PRECISION |
PREPARE |
PRESERVE |
PRIMARY |
PRIOR |
PRIVILEGES |
PROCEDURE |
||
QUERY |
||
READ |
REAL |
RECURSIVE |
REF |
REFERENCES |
REFERENCING |
RELATIVE |
RENAME |
REPLACE |
RESIGNAL |
RESTRICT |
RETURN |
RETURNS |
REVOKE |
RIGHT |
ROLE |
ROLLBACK |
ROLLUP |
ROUTINE |
ROW |
ROWNUM |
ROWS |
||
SAVEPOINT |
SCHEMA |
SCOPE |
SCROLL |
SEARCH |
SECOND |
SECOND_MILLISECOND |
SECTION |
SELECT |
SENSITIVE |
SEQUENCE |
SEQUENCE_OF |
SERIALIZABLE |
SESSION |
SESSION_USER |
SET |
SET_OF |
SETEQ |
SHARED |
SIBLINGS |
SIGNAL |
SIMILAR |
SIZE |
SMALLINT |
SOME |
SQL |
SQLCODE |
SQLERROR |
SQLEXCEPTION |
SQLSTATE |
SQLWARNING |
STATISTICS |
STRING |
SUBCLASS |
SUBSET |
SUBSETEQ |
SUBSTRING |
SUM |
SUPERCLASS |
SUPERSET |
SUPERSETEQ |
SYS_CONNECT_BY_PATH |
SYS_DATE |
SYS_DATETIME |
SYS_TIME |
SYS_TIMESTAMP |
SYSDATE |
SYSDATETIME |
SYSTEM_USER |
SYSTIME |
|
TABLE |
TEMPORARY |
THEN |
TIME |
TIMESTAMP |
TIMEZONE_HOUR |
TIMEZONE_MINUTE |
TO |
TRAILING |
TRANSACTION |
TRANSLATE |
TRANSLATION |
TRIGGER |
TRIM |
TRUE |
TRUNCATE |
||
UNDER |
UNION |
UNIQUE |
UNKNOWN |
UPDATE |
UPPER |
USAGE |
USE |
USER |
USING |
UTIME |
|
VALUE |
VALUES |
VARCHAR |
VARIABLE |
VARYING |
VCLASS |
VIEW |
||
WHEN |
WHENEVER |
WHERE |
WHILE |
WITH |
WITHOUT |
WORK |
WRITE |
|
XOR |
||
YEAR |
YEAR_MONTH |
|
ZONE |