Answers for "how to drop a table in sql"

SQL
0

Drop SQL STATEMENT

DROP object object_name

Examples:
DROP TABLE table_name;
table_name: Name of the table to be deleted.

DROP DATABASE database_name;
database_name: Name of the database to be deleted.
Posted by: Guest on September-18-2021
0

sql drop all tables

DECLARE @sql NVARCHAR(max)=''

SELECT @sql += ' Drop table ' + QUOTENAME(TABLE_SCHEMA) + '.'+ QUOTENAME(TABLE_NAME) + '; '
FROM   INFORMATION_SCHEMA.TABLES
WHERE  TABLE_TYPE = 'BASE TABLE'

Exec Sp_executesql @sql
Posted by: Guest on October-18-2021
1

sql delete table

Deletes a table from a database.
Example: Removes the users table.
DROP TABLE users;
Posted by: Guest on January-07-2021

Code answers related to "how to drop a table in sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language