Drop several tables via BCP or something else as task

Posted on 2005-05-09
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

    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

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now