暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
DELETE (Transact-SQL) .pdf
92
14页
0次
2023-12-21
免费下载
DELETE (Transact-SQL)
项⽬
2023/05/24
25 个参与者
反馈
本文内容 语法 参数 最佳实践 错误处理 显⽰另外 8
适⽤于: SQL Server Azure SQL 数据库 Azure SQL 托管实例 Azure Synapse
Analytics Analytics Platform System (PDW) Microsoft Fabric 中的仓库
SQL Server 的表或视图中删除⼀⾏或多⾏。
Transact-SQL 语法约定
语法
syntaxsql复制
-- Syntax for SQL Server and Azure SQL Database 
[ WITH <common_table_expression> [ ,...n ] ] 
DELETE 
 [ TOP ( expression ) [ PERCENT ] ] 
 [ FROM ] 
 { { table_alias 
  | <object> 
  | rowset_function_limited 
  [ WITH ( table_hint_limited [ ...n ] ) ] } 
  | @table_variable 
 } 
 [ <OUTPUT Clause> ] 
 [ FROM table_source [ ,...n ] ] 
 [ WHERE { <search_condition> 
     | { [ CURRENT OF 
         { { [ GLOBAL ] cursor_name } 
           | cursor_variable_name 
         } 
       ] 
      } 
     } 
 ] 
 [ OPTION ( <Query Hint> [ ,...n ] ) ] 
[; ] 
syntaxsql复制
syntaxsql复制
备注
若要查看 SQL Server 2014 及更早版本的 Transact-SQL 语法,请参阅 早期版本文档
参数
WITH common_table_expression<>
指定在 DELETE 语句作⽤域内定义的临时命名结果集,也称为公⽤表表达式。 结果集源⾃
SELECT 语句。
<object> ::= 
{ 
 [ server_name.database_name.schema_name. 
  | database_name. [ schema_name ] . 
  | schema_name. 
 ] 
 table_or_view_name 
} 
-- Syntax for Azure Synapse Analytics and Microsoft Fabric
[ WITH <common_table_expression> [ ,...n ] ]
DELETE [database_name . [ schema ] . | schema. ] table_name 
FROM [database_name . [ schema ] . | schema. ] table_name
JOIN {<join_table_source>}[ ,...n ] 
ON <join_condition>
[ WHERE <search_condition> ] 
[ OPTION ( <query_options> [ ,...n ] ) ] 
[; ] 
<join_table_source> ::= 
{ 
 [ database_name . [ schema_name ] . | schema_name . ] table_or_view_name [
AS ] table_or_view_alias
 [ <tablesample_clause>] 
 | derived_table [ AS ] table_alias [ ( column_alias [ ,...n ] ) ] 
} 
-- Syntax for Parallel Data Warehouse 
DELETE
 [ FROM [database_name . [ schema ] . | schema. ] table_name ] 
 [ WHERE <search_condition> ] 
 [ OPTION ( <query_options> [ ,...n ] ) ] 
[; ] 
of 14
免费下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜