当前位置: 移动技术网 > IT编程>数据库>MSSQL > T-SQL基本语句使用,select语法、insert语法、update语法、delete语法

T-SQL基本语句使用,select语法、insert语法、update语法、delete语法

2018年02月18日  | 移动技术网IT编程  | 我要评论

珠海竹仙公园,洞口县人民政府,素女心经

select语法

select [all|distinct] [ top (<表达式>) [percent] [with ties] ] <列名列表>
[from <源表/视图>]
[where <限制条件>]
[group by <列名称或表达式使用选择列表中的列>]
[having <基于组的结果限制性条件>]
[order by <列名列表>]
[ [for xml [raw|auto|explicit|path [(<元素>)]] [,xmldata][,elements][,binary base 64]]
[option (<查询提示>,[, ...n])]

insert语法

insert [top ( <expression> ) [percent] ] [into] <tabular object>
[ (<column list>) ]
[ output <output clause> ]
[ values (<data values>) [, (<data values>) ] [, ...n]
| <table source>
|exec <prodecure>

update语法

update [top ( <expression> ) [perecnt] ]<tabular object>
set <column>=<value> [. write (<expression>,<offset>,<length>)]
[,<column>=<value>[.write(expression>,<offset>,<length>)]
[output <output clause> ]
[from <source table(s)>]

delete语法

delete [top ( <expression> ) [precent] ] [from] <tabular object>
[output <output clause> ]
[from <table or join condition>]
[where <search condition> | current of [global] <cursor name>]

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网