IT Log
DROP 본문
728x90
반응형
DROP DATDABASE
DROP SCHEMA [ IF EXISTS ] schema_name
Examples
CREATE SCHEMA Sprockets AUTHORIZATION Krishna
CREATE TABLE NineProngs (source int, cost int, partnumber int)
GRANT SELECT TO Anibal
DENY SELECT TO [Hung-Fu];
GO
DROP TABLE Sprockets.NineProngs;
DROP SCHEMA Sprockets;
GO
DROP DATDABASE
DROP DATABASE [ IF EXISTS ] { database_name | database_snapshot_name } [ ,...n ] [;]
Examples
DROP DATABASE Sales;
DROP DATABASE Sales, NewSales;
DROP DATABASE sales_snapshot0600;
DROP TABLE
DROP TABLE [ IF EXISTS ] { database_name.schema_name.table_name | schema_name.table_name | table_name } [ ,...n ] [ ; ]
Examples
DROP TABLE ProductVendor1 ;
DROP TABLE AdventureWorks2012.dbo.SalesPerson2 ;
CREATE TABLE T1 (Col1 int);
GO
DROP TABLE IF EXISTS T1;
GO
DROP TABLE IF EXISTS T1;
728x90
반응형
'SQL > SQL Server' 카테고리의 다른 글
[SQL Server] INSERT (0) | 2022.01.17 |
---|---|
[SQL Server] DELETE (0) | 2022.01.17 |
[SQL Server] Data Type (0) | 2022.01.17 |
[SQL Server] CREATE TABLE (0) | 2022.01.17 |
[SQL Server] CREATE DATABASE (0) | 2022.01.17 |
Comments