欢迎访问 生活随笔!

凯发k8官方网

当前位置: 凯发k8官方网 > 运维知识 > 数据库 >内容正文

数据库

保留关键字 (transact-凯发k8官方网

发布时间:2024/10/8 数据库 0 豆豆
凯发k8官方网 收集整理的这篇文章主要介绍了 保留关键字 (transact-sql) user 也是,哎 小编觉得挺不错的,现在分享给大家,帮大家做个参考.
sql server 2005  

microsoft sql server 2005 使用保留关键字来定义、操作或访问数据库。 保留关键字是 sql server 使用的 transact-sql 语言语法的一部分,用于分析和理解 transact-sql 语句和批处理。 尽管在 transact-sql 脚本中使用 sql server 保留关键字作为标识符和对象名在语法上是可行的,但规定只能使用分隔标识符。

下表列出了 sql server 保留关键字。

add

exists

primary

all

exit

print

alter

external

proc

and

fetch

procedure

any

file

public

as

fillfactor

raiserror

asc

for

read

authorization

foreign

readtext

backup

freetext

reconfigure

begin

freetexttable

references

between

from

replication

break

full

restore

browse

function

restrict

bulk

goto

return

by

grant

revert

cascade

group

revoke

case

having

right

check

holdlock

rollback

checkpoint

identity

rowcount

close

identity_insert

rowguidcol

clustered

identitycol

rule

coalesce

if

save

collate

in

schema

column

index

securityaudit

commit

inner

select

compute

insert

session_user

constraint

intersect

set

contains

into

setuser

containstable

is

shutdown

continue

join

some

convert

key

statistics

create

kill

system_user

cross

left

table

current

like

tablesample

current_date

lineno

textsize

current_time

load

then

current_timestamp

national

to

current_user

nocheck

top

cursor

nonclustered

tran

database

not

transaction

dbcc

null

trigger

deallocate

nullif

truncate

declare

of

tsequal

default

off

union

delete

offsets

unique

deny

on

unpivot

desc

open

update

disk

opendatasource

updatetext

distinct

openquery

use

distributed

openrowset

user

double

openxml

values

drop

option

varying

dump

or

view

else

order

waitfor

end

outer

when

errlvl

over

where

escape

percent

while

except

pivot

with

exec

plan

writetext

execute

precision


另外,sql-2003 标准还定义了保留关键字列表。 不要使用 sql-2003 保留关键字作为对象名和标识符。 odbc 保留关键字列表(如下表所示)与 sql-2003 保留关键字列表相同。

注意:
sql-2003 保留关键字列表有时可能比 sql server 限制更多,有时则限制更少。 例如,sql-2003 保留关键字列表包含 int,而 sql server 不需要将其区分为保留关键字。

transact-sql 保留关键字可用作数据库或数据库对象(如表、列、视图等)的标识符或名称。 使用带引号的标识符或分隔标识符。 不限制将保留关键字用作变量和存储过程参数的名称。 有关详细信息,请参阅使用标识符作为对象名称。

odbc 保留关键字

保留了下列关键字以用于 odbc 函数调用。 这些关键字根本不约束 sql 语法;然而,为确保与支持核心 sql 语法的驱动程序兼容,应用程序应避免使用这些关键字。

下面是当前的 odbc 保留关键字列表。

absolute

exec

overlaps

action

execute

pad

ada

exists

partial

add

external

pascal

all

extract

position

allocate

false

precision

alter

fetch

prepare

and

first

preserve

any

float

primary

are

for

prior

as

foreign

privileges

asc

fortran

procedure

assertion

found

public

at

from

read

authorization

full

real

avg

get

references

begin

global

relative

between

go

restrict

bit

goto

revoke

bit_length

grant

right

both

group

rollback

by

having

rows

cascade

hour

schema

cascaded

identity

scroll

case

immediate

second

cast

in

section

catalog

include

select

char

index

session

char_length

indicator

session_user

character

initially

set

character_length

inner

size

check

input

smallint

close

insensitive

some

coalesce

insert

space

collate

int

sql

collation

integer

sqlca

column

intersect

sqlcode

commit

interval

sqlerror

connect

into

sqlstate

connection

is

sqlwarning

constraint

isolation

substring

constraints

join

sum

continue

key

system_user

convert

language

table

corresponding

last

temporary

count

leading

then

create

left

time

cross

level

timestamp

current

like

timezone_hour

current_date

local

timezone_minute

current_time

lower

to

current_timestamp

match

trailing

current_user

max

transaction

cursor

min

translate

date

minute

translation

day

module

trim

deallocate

month

true

dec

names

union

decimal

national

unique

declare

natural

unknown

default

nchar

update

deferrable

next

upper

deferred

no

usage

delete

none

user

desc

not

using

describe

null

value

descriptor

nullif

values

diagnostics

numeric

varchar

disconnect

octet_length

varying

distinct

of

view

domain

on

when

double

only

whenever

drop

open

where

else

option

with

end

or

work

end-exec

order

write

escape

outer

year

except

output

zone

exception

将来的关键字

下列关键字可能会在将来的 sql server 版本中保留使用,作为将来要实现的新功能。 注意,不要使用这些关键字作为标识符。

absolute

free

preserve

action

fulltexttable

prior

admin

general

privileges

after

get

reads

aggregate

global

real

alias

go

recursive

allocate

grouping

ref

are

host

referencing

array

hour

relative

assertion

ignore

result

at

immediate

returns

before

indicator

role

binary

initialize

rollup

bit

initially

routine

blob

inout

row

boolean

input

rows

both

int

savepoint

breadth

integer

scroll

call

interval

scope

cascaded

isolation

search

cast

iterate

second

catalog

language

section

char

large

sequence

character

last

session

class

lateral

sets

clob

leading

size

collation

less

smallint

completion

level

space

connect

limit

specific

connection

local

specifictype

constraints

localtime

sql

constructor

localtimestamp

sqlexception

corresponding

locator

sqlstate

cube

map

sqlwarning

current_path

match

start

current_role

minute

state

cycle

modifies

statement

data

modify

static

date

module

structure

day

month

temporary

dec

names

terminate

decimal

natural

than

deferrable

nchar

time

deferred

nclob

timestamp

depth

new

timezone_hour

deref

next

timezone_minute

describe

no

trailing

descriptor

none

translation

destroy

numeric

treat

destructor

object

true

deterministic

old

under

dictionary

only

unknown

diagnostics

operation

unnest

disconnect

ordinality

usage

domain

out

using

dynamic

output

value

each

pad

varchar

end-exec

parameter

variable

equals

parameters

whenever

every

partial

without

exception

path

work

false

postfix

write

first

prefix

year

float

preorder

zone

found

prepare




转载于:https://www.cnblogs.com/kanego/archive/2011/04/25/2026620.html

总结

以上是凯发k8官方网为你收集整理的保留关键字 (transact-sql) user 也是,哎的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得凯发k8官方网网站内容还不错,欢迎将凯发k8官方网推荐给好友。

网站地图