skip to Main Content

i saved a table in my SSMS database but its not showing even after i refresh it. any idea what should be done??

2

Answers


  1. A couple of basics you can try for this:

    • Try running:

      SELECT * FROM [<YOUR_DATABASE>..<YOUR_TABLE>];

      If an exception is returned, the table did not create.

    • In the left sidebar, expand:

      Databases > your db > Tables

      Right-click tables and press ‘refresh’. See if it appears in the list.
      If not, the table did not create.

    Login or Signup to reply.
  2. Try reconnect and asure yourself that you are creating table rather than temporary table which disapear after closing or interupting session.

    1. When reconnect will help. It means that table was created but only view of it wasn’t available yet.
    2. Data from temporary table begin name with # sign. To check if you using temporary table you can perform code shown below:
        if object_id('tempdb..#yourtablename') is null 
            PRINT N'Temporary table is not created';
        if object_id('tempdb..#yourtablename') is not null 
            PRINT N'Temporary table is created';
        if object_id('dbo.yourtablename') is null
            PRINT N'Normal table is not created';
        if object_id('dbo.yourtablename') is not null 
            PRINT N'Normal table is created';     
    

    Make sure that you are in the database where you previously created the table

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search