Learn how to a build a cloud-first strategyRegister Now


Drop several tables via BCP or something else as task

Posted on 2005-05-09
Medium Priority
Last Modified: 2010-03-19
Via bcp I can create a batch script or do something extra.

I want to drop tables "table1 , table 2, table 3" from database "mydatabase"
which resides in MS SQL server.

username: sa password: mypass
Thank you

I'll test your solution
Question by:Mr_PC2000
1 Comment
LVL 21

Accepted Solution

Kevin3NF earned 400 total points
ID: 13963266
is this something you expect to run regularly? Or do you just need to drop these once?

You can use osql to run:

Drop table table1
Drop table table2
Drop table table3

Not sure why you want to use bcp for this...don;t think you can :-)

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question