Create Table runs - no errors - but no table

  • I ran the following SQL code to create a table in the existing database neuro, into a schema named stroke:

    USE Neuro

    GO

    create table stroke.atest (

    [PID] [int] not null ,

    [lastname] [varchar](50) not null)

    GO

    the results says 'Command(s) completed successfully' but even after I refresh, the table does not exist anywhere. I tried other queries and even when 'completed successfully' nothing is happening

    Thanks for your help!

  • Query the system views to see if it exists.

    SELECT *

    FROM INFORMATION_SCHEMA.TABLES

    WHERE TABLE_NAME = 'atest'

  • and make sure that you are in the Neuro database.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • I ran

    SELECT *

    FROM INFORMATION_SCHEMA.TABLES

    WHERE TABLE_NAME = 'atest'

    the result table is empty

  • I again ran the code using the name of an existing table in the database

    SELECT *

    FROM INFORMATION_SCHEMA.TABLES

    WHERE TABLE_NAME = 'baloon'

    and the results said 'Command(s) completed successfully.' but no actual results were posted

  • Make sure you are in the right database. You can see what database you are in via the dropdown at the top of the screen. It is next to the execute button.

  • I did check if I'm in the right database. I am. The query editor doesn't seem to be working correctly. Anything I can check (a service, etc.) before I have to do a reinstall?

  • SET NOEXEC OFF

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • I tried SET NOEXEC OFF

    it didn't make any difference. I've kicked this up to our IS staff, maybe they'll figure it out.

    Thanks for the help

  • If [font="Courier New"]SELECT * FROM INFORMATION_SCHEMA.TABLES[/font] returns no output then either something like SET NOEXEC is preventing run from running or producing output, or else, you just do not have sufficient rights to view anything (which I guess is possible, but weird since your CREATE TABLE didn't generate an error).

    Be sure to let us know what this was.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • I'm embarrassed to admit that the error was mine. I was clicking on the checkmark next to the word 'execute' in the menu. It turns out that the checkmark means 'parse' not 'execute'. There is no way anyone could have guessed this was the problem from my postings. We just converted from SQL7 to 2005 and I'm getting used to the new interface. Thanks a lot for everyone's help. I am very impressed with the speed and intelligence of your suggestions.

  • Thanks for letting us know.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Funny how some of the easiest things can trip you up, sometimes for days. :hehe:

    If it was easy, everybody would be doing it!;)

Viewing 13 posts - 1 through 12 (of 12 total)

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