Avatar of cja-tech-guy
cja-tech-guy
Flag for United States of America asked on

Delete a table from SQL 2005

We are trying to reduce the space taken up by the database for our accounting system.  We were told by their tech support which tables are temporary and can be deleted.  How do I delete a table in SQL? Do I right click and choose "delete"?

Also, I went into SQL, clicked on the database name and then on the tables folder but I did not see any tables that matched the names given to us by tech support.  Any ideas on why they would not be there?  Could SQl be deleting them automatically?

Thanks,

cja
Microsoft SQL Server 2005

Avatar of undefined
Last Comment
cja-tech-guy

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
pdd1lan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
pdd1lan

also, if tables are temporary tables,

you can execute query: DROP TABLE #delete_table_name


suggestion: before you delete your tables, make sure have database back up just in case you mistake delete any table that you are not intended to.
SOLUTION
Anoo S Pillai

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
cja-tech-guy

ASKER
Anoo

I do not know SQL at all.  How do you shrink a database?

Thanks,
CJA
cja-tech-guy

ASKER
Can anyone comment on how to shrink a databse in SQL 2005?

Thanks,

cja
Your help has saved me hundreds of hours of internet surfing.
fblack61