SQL Server 2008编程入门经典笔记:T-SQL基本语句

来源:互联网 发布:帝国cms图片集 编辑:程序博客网 时间:2024/05/22 00:07

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>]
阅读全文
0 0