Questions tagged [drop-table]
This tag is for the SQL command DROP TABLE
56 questions
1
vote
1
answer
2k
views
How to drop table with all reference to this table
I want to drop a table, and this table has be many table's foreign key.
So I want to drop all those reference (just refernece, not other table) within the drop table process.
Is there any simple SQL,...
8
votes
4
answers
28k
views
Difference between DROP and TRUNCATE
What does the TRUNCATE do differently to drop?
I believe it deletes all the data in the table but keeps the table name in the database, where as DROP deletes all data and the table. Is this correct ?...
3
votes
1
answer
12k
views
Is it possible to force drop of mysql tables with FK?
For dropping a table in which a Foreign Key is used in other tables, it is necessary to drop all other tables having FK connection with the corresponding table.
Is there a short way to drop a table, ...
7
votes
2
answers
75k
views
How to undo DROP TABLE statement?
I’ve accidentally executed DROP TABLE statement on a wrong table. I have backups that are several days old that I can use to recover table and most of the data but not all.
I know that SQL Server ...
8
votes
4
answers
28k
views
Shrink database after drop table?
I had a table with 70+ million records in a SQL Server database, I dropped that table (a one-time thing) to free up space on the disk, but it looks like the size didn't change much. I do see that I ...
20
votes
7
answers
118k
views
How to drop multiple tables with common prefix in one query?
I'm using Microsoft SQL Server 2008.My question is:How to drop multiple tables with common prefix in one query?
something like that table names:
LG_001_01_STLINE,
LG_001_02_STFICHE