Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7945423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:51:40+00:00 2026-06-04T00:51:40+00:00

I first drop a table in SQL Server 2008 (after that it shows the

  • 0

I first drop a table in SQL Server 2008 (after that it shows the message that the command was executed sucessfully).

I then tried to create a table with the same name, and it showed me an error.

After closing the SSMS window and re opening it it tried to create the table with the same name again and it succeeded.

What is going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:51:44+00:00Added an answer on June 4, 2026 at 12:51 am

    You can’t drop and create the same table in the same batch in sql server
    see MSDN

    Their examples use GO to break up the two commands. Semi colon might work,

    Drop Table …;
    Create Table ,,,;

    as might

    Begin Transaction
    Drop Table...
    Commit Transaction
    Create Table
    

    Or of course splitting it up into two commands, which is what GO does in SQL server manager’s query window.

    If you do split it up, it might be wise to check whether the table exists before trying to drop it, and that it doesn’t before trying to create it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using EF 4.1 Code First with SQL Server 2008 R2. I have
Using: SQL Server Database: Northwind I'd like to drop a table primary key, without
I'm using the SQL Server 2008 PIVOT function after I turn a CSV field
I'm after a simple stored procedure to drop tables. Here's my first attempt: CREATE
I am working on sql server monitoring product and i have database query that
I successfully created my first Entity Framework Code first project using SQL Server CE.
I need to delete many rows from sql server 2008 database, it must be
I am using SQL Server 2008 R2 I am trying to write a single
I'd like to drop a user in a SQL Server script but I'll need
I have a SQL DTS package running on a SQL Server 2005 database that,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.