sql有哪些保留字

sql有哪些保留字,第1张

sql中的保留字

action add aggregate all

alter after and as

asc avg avg_row_length auto_increment

between bigint bit binary

blob bool both by

cascade case char character

change check checksum column

columns comment constraint create

cross current_date current_time current_timestamp

data database databases date

datetime day day_hour day_minute

day_second dayofmonth dayofweek dayofyear

dec decimal default delayed

delay_key_write delete desc describe

distinct distinctrow double drop

end else escape escaped

enclosed enum explain exists

fields file first float

float4 float8 flush foreign

from for full function

global grant grants group

having heap high_priority hour

hour_minute hour_second hosts identified

ignore in index infile

inner insert insert_id int

integer interval int1 int2

int3 int4 int8 into

if is isam join

key keys kill last_insert_id

leading left length like

lines limit load local

lock logs long longblob

longtext low_priority max max_rows

match mediumblob mediumtext mediumint

middleint min_rows minute minute_second

modify month monthname myisam

natural numeric no not

null on optimize option

optionally or order outer

outfile pack_keys partial password

precision primary procedure process

processlist privileges read real

references reload regexp rename

replace restrict returns revoke

rlike row rows second

select set show shutdown

smallint soname sql_big_tables sql_big_selects

sql_low_priority_updates sql_log_off sql_log_update sql_select_limit

sql_small_result sql_big_result sql_warnings straight_join

starting status string table

tables temporary terminated text

then time timestamp tinyblob

tinytext tinyint trailing to

type use using unique

unlock unsigned update usage

values varchar variables varying

varbinary with write when

where year year_month zerofill

sql里add后面加column。根据查询相关资料信息显示,sql里add后面加column为ADDCOLUMN,是SQL的保留字,使用其可向表中添加字段。SQL是一种计算机语言,用来存储、检索和修改关系数据库中存储的数据。SQL是关系型数据库的标准语言,所有的关系型数据库管理系统(RDBMS)。

有特定语义的单词或者字符串,比如select 、from等语法用词;len、sum等函数用词;sp_help、xp_cmdshell等系统存储过程用词....

在数据库设计时,要避免使用这些字符串作为实体的名称,比如数据库名称、表名称、字段名称,或者触发器、视图、存储过程等等的名称都不要用到以上关键字,如果使用了,那么在SQL语句中,要使用[]方括号以示区别。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/sjk/9937245.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-03
下一篇2023-05-03

发表评论

登录后才能评论

评论列表(0条)

    保存