|
Subject:
|
Deletion..
|
|
Posted By:
|
ankur_icfai
|
Post Date:
|
8/23/2006 3:54:48 AM
|
O Hi..mates
Can any one tell how to Drop all the tables from the database starting with the same name ...say starting with 'f'(using only one query).
|
|
Reply By:
|
Peso
|
Reply Date:
|
8/24/2006 2:05:54 AM
|
Why just one query? Is this homework?
|
|
Reply By:
|
ankur_icfai
|
Reply Date:
|
8/24/2006 5:51:57 AM
|
Well i din't get an answer to my question!!!
|
|
Reply By:
|
Imar
|
Reply Date:
|
8/24/2006 10:46:37 AM
|
You got what is called a follow-up question.
If we understand the reasoning behind your constraints (e.g. only one query can be used) we can provide better answers.
If this is a homework question, you should do some research yourself. If this is not homework, you should be able to provide more details about your questions, thus helping us help you.
If you're not willing to do that, how come you expect us to help you?
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me. Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004 Want to be my colleague? Then check out this post.
|
|
Reply By:
|
Peso
|
Reply Date:
|
8/25/2006 12:54:47 AM
|
delete FROM sysobjects where name like 'f%' and xtype = 'u'
|
|
Reply By:
|
Imar
|
Reply Date:
|
8/25/2006 1:33:43 AM
|
Hi Peso,
If you wanted to know whether it was homework or not, why did you provide an answer before you got his / her answer? ;-)
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me. Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004 Want to be my colleague? Then check out this post.
|
|
Reply By:
|
Peso
|
Reply Date:
|
8/25/2006 2:30:06 AM
|
It will take days, if at all, until he gets back. I don't expect that due to his second post.
My first thought was to write only "DELETE FROM sysobjects" to teach him a lesson. But I didn't.
|
|
Reply By:
|
Imar
|
Reply Date:
|
8/26/2006 3:18:17 AM
|
quote: It will take days, if at all, until he gets back. I don't expect that due to his second post.
Exactly. That's when I usually decide not to spend time on an answer. If the OP isn't interested or willing to put some time in, why bother.....
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me. Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004 Want to be my colleague? Then check out this post.
|
|
Reply By:
|
ankur_icfai
|
Reply Date:
|
8/30/2006 7:31:52 AM
|
well guys i am relly sorry...as i was busy with a lot of work...this query is not a homework man i work in a company....here we had a problem...we had many tables that start from same name and and if we want to drop them all either we have to do it one by one or go to the enterprise manager and delete some of them in one go which are in a line...so i need to know is there a query that can do the job for me....to delete all the tables starting with the same name....
|