SQL drop

  •  

    DROP TABLE IF EXISTS OARD, and a correlated subquery with a grouping that would give the total of adding all the null and blank votes, but I'm a bit lost. Thanks for the help!

    • This topic was modified 3 months, 3 weeks ago by  galaxykitty40.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • I'm not sure what you mean. You're saying you want to drop the table if it exists AND some additional criteria? DROP only uses IF EXISTS. There's not a way, within the DROP statement itself, to add more criteria. So, step back, make an IF statement that matches the additional criteria, then, if that passes, go to the DROP IF EXISTS.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore Roosevelt
    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply