DROP TABLE [IF EXISTS] [db_name.]table_name; 说明:SQL中加[IF EXISTS] ,可以防止因表不存在而导致执行报错。 参数:db_name:Database名称。如果未指定,将选择当前database。table_name:需要删除的Table名称。 3、示例 以下示例演示DROP命令的使用,依次执行如下SQL语句: --删除整个表course DROP TABLE IF EX...
Azure SQL DatabaseOnly the server-level principal login (created by the provisioning process) or members of the dbmanager database role can drop a database.Analytics Platform System (PDW)Requires the CONTROL permission on the database, or ALTER ANY DATABASE permission, or membership in the db...
RemoteDataArchiveDbCredentialSetting RemoteDataArchiveDbFederatedServiceAccountSetting RemoteDataArchiveDbServerSetting RemoteDataArchiveTableOption RemoteServiceBindingOption RemoteServiceBindingOptionKind RemoteServiceBindingStatementBase RenameAlterRoleAction RenameEntityStatement ResampleStatisticsOption ResourcePoolA...
SQL 复制 ALTER DATABASE AdventureWorksPDW2012 SET ENCRYPTION OFF; GO /* Wait for decryption operation to complete, look for a value of 1 in the query below. */ WITH dek_encryption_state AS ( SELECT ISNULL(db_map.database_id, dek.database_id) AS database_id, encryption_state FROM sy...
Azure SQL DatabaseOnly the server-level principal login (created by the provisioning process) or members of the dbmanager database role can drop a database.Analytics Platform System (PDW)Requires the CONTROL permission on the database, or ALTER ANY DATABASE permission, or membership in the db...
Requires the ALTER permission on the schema to which the table belongs, CONTROL permission on the table, or membership in the db_ddladmin fixed database role. If the statement drops a ledger table, the ALTER LEDGER permission is required. Examples A. Dropping a table in the current database...
SQL Server Azure SQL 托管实例 删除分发数据库。 如果数据库未使用物理文件,则删除该数据库使用的物理文件。 此存储过程在分发服务器上的任何数据库中执行。 Transact-SQL 语法约定 语法 syntaxsql sp_dropdistributiondb[ @database = ]N'database'[ , [ @former_ag_secondary= ]former_ag_secondary] [ ; ...
此语句可以嵌入在应用程序中,也可通过动态 SQL 语句来发出。 它是一个可执行语句,仅当 DYNAMICRULES 运行行为对于程序包有效时才能动态编译 (SQLSTATE 42509)。 授权 当删除允许两部分名称的对象时,该语句的授权标识所拥有的特权必须至少包含下列其中一个权限: ...
若要执行DROP INDEX,至少需要对表或视图具有ALTER权限。 默认情况下,将向sysadmin固定服务器角色以及db_ddladmin和db_owner固定数据库角色授予此权限。 示例 本文中的 Transact-SQL 代码示例使用AdventureWorks2022或AdventureWorksDW2022示例数据库,可从Microsoft SQL Server 示例和社区项目主页下载它。
sys.sp_xtp_bind_db_resource_pool sys.sp_xtp_checkpoint_force_garbage_collection sys.sp_xtp_control_proc_exec_stats sys.sp_xtp_control_query_exec_stats sys.sp_xtp_force_gc sys.sp_xtp_merge_checkpoint_files sys.sp_xtp_unbind_db_resource_pool ...