locked
Where did my tables go? RRS feed

  • Question

  • I recently installed SQL Server 2012 on my computer.  I've installed AdventureWorks2012 without much problems.  Now I'm venturing out to start creating my own tables.  I executed the commands to create the tables.  They seem to go through successfully, except for the fact I can't find the tables in the Object Explorer.  When I tried creating the tables again, I was told they already exist.  Where did they go?
    Wednesday, March 12, 2014 2:37 AM

Answers

  • Did you refresh the tables folder in objects explorer?

    Tibor Karaszi, SQL Server MVP | web | blog

    • Marked as answer by tracycai Friday, March 21, 2014 9:47 AM
    Wednesday, March 12, 2014 3:15 AM
  • HI

    1. Always check before executing any sql statement in sql management studio that you are connected to desired database 
    2. After executing DDL queries always refresh sql object explore

    Mark as answer if you find it useful


    Shridhar J Joshi Thanks a lot

    • Marked as answer by tracycai Friday, March 21, 2014 9:47 AM
    Wednesday, March 12, 2014 4:38 AM
  • you need to refresh and check to see newly created objects


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    Wednesday, March 12, 2014 5:25 AM
    Answerer
  • Alternate way to search a table is using sys.objects.

    Refer http://stackoverflow.com/questions/1025022/find-an-object-in-sql-server-cross-database


    Regards, RSingh

    Wednesday, March 12, 2014 3:51 PM
  • If you did not first issue command for example, USE AdventureWorks2012 ; your table will likely be in MASTERS database. That's where you are when you first open the New Query window.

    Expand ServerName, expand Databases, expand System Databases, expand master, expand Tables. Is it there?

    • Marked as answer by tracycai Friday, March 21, 2014 9:47 AM
    Wednesday, March 12, 2014 4:10 PM
  • Hi,

    Please refer to the previous replies. Refresh the database and you should be able to see the new table.

    Also, make sure that you are looking for the table in the right database which you specified in the query.

    If any questions, please feel free to post it here.

    Thanks.


    Tracy Cai
    TechNet Community Support

    Thursday, March 13, 2014 7:00 AM
  • What was the selected database when you run your statements? If you didn't switch the database, check it with select db_name() as DB_Name and look under that database tables folder (press F5 to refresh the tables first in Object Explorer).


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    • Marked as answer by tracycai Friday, March 21, 2014 9:47 AM
    Wednesday, March 12, 2014 3:37 AM

All replies

  • Did you refresh the tables folder in objects explorer?

    Tibor Karaszi, SQL Server MVP | web | blog

    • Marked as answer by tracycai Friday, March 21, 2014 9:47 AM
    Wednesday, March 12, 2014 3:15 AM
  • What was the selected database when you run your statements? If you didn't switch the database, check it with select db_name() as DB_Name and look under that database tables folder (press F5 to refresh the tables first in Object Explorer).


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    • Marked as answer by tracycai Friday, March 21, 2014 9:47 AM
    Wednesday, March 12, 2014 3:37 AM
  • HI

    1. Always check before executing any sql statement in sql management studio that you are connected to desired database 
    2. After executing DDL queries always refresh sql object explore

    Mark as answer if you find it useful


    Shridhar J Joshi Thanks a lot

    • Marked as answer by tracycai Friday, March 21, 2014 9:47 AM
    Wednesday, March 12, 2014 4:38 AM
  • you need to refresh and check to see newly created objects


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    Wednesday, March 12, 2014 5:25 AM
    Answerer
  • Alternate way to search a table is using sys.objects.

    Refer http://stackoverflow.com/questions/1025022/find-an-object-in-sql-server-cross-database


    Regards, RSingh

    Wednesday, March 12, 2014 3:51 PM
  • If you did not first issue command for example, USE AdventureWorks2012 ; your table will likely be in MASTERS database. That's where you are when you first open the New Query window.

    Expand ServerName, expand Databases, expand System Databases, expand master, expand Tables. Is it there?

    • Marked as answer by tracycai Friday, March 21, 2014 9:47 AM
    Wednesday, March 12, 2014 4:10 PM
  • Hi,

    Please refer to the previous replies. Refresh the database and you should be able to see the new table.

    Also, make sure that you are looking for the table in the right database which you specified in the query.

    If any questions, please feel free to post it here.

    Thanks.


    Tracy Cai
    TechNet Community Support

    Thursday, March 13, 2014 7:00 AM