In this article, I am explaining how to drop all tables and procedures in Sql Server.
Query:-
With the help of above queries, we got drop statement for all procedures and tables.
Query:-
SELECT
'DROP
Procedure ['
+
SCHEMA_NAME(p.schema_id)
+
'].['
+
p.NAME
+
'];'
FROM
sys.procedures
p
SELECT
'DROP
TABLE ['
+
SCHEMA_NAME(p.schema_id)
+
'].['
+
p.NAME
+
'];'
FROM
sys.tables
p
No comments:
Post a Comment