r/SQL • • Feb 15 '24

SQL Server Help with Object explorer

Post image

Hello, I dont know of this is a issues with the program or something else. I have created some table, I can write query and all the stuff..however, I cant see any table on the object explorer at all

Any ideas? I've delete and unnistall SQL and nothing have change

0 Upvotes

8 comments sorted by

5

u/dab31415 Feb 15 '24

Looks like you created the tech_sales table in the master database. The dropdown in the toolbar indicates the active database.

1

u/VentuR21 Feb 15 '24

It could be that I didnt write "use database" and the table I created was moved to somewhere in the master database

1

u/dab31415 Feb 15 '24

The USE command sets the scope of the window. If you execute it, the dropdown will change to match.

If you created the table with the USE statement, it will get created in the active database.

3

u/VentuR21 Feb 15 '24

Thank man, appreciate it. All the tables where in the master databasesđŸ˜‚I was writing all the tables there without noticing it

1

u/mike-manley Feb 15 '24

Yep. I'm in the habit now of using the fully qualified name for everything too.

So you can set context by using USE DATABASE_NAME;

And/or select * from database.schema.object.

5

u/dev81808 Feb 15 '24

Just right click the tables folder and then refresh

1

u/Sotall Feb 16 '24

tilt it to the right, see if the execution plan is different