How to run tables from database in MySQL?

I wonder why should I write : sql_store.orders instead of orders When I want to use order table?

Before I could just write orders as Mosh wrote in the videos. Since I closed Mysql once and opened it again I should write sql_store. before any table that I want to use.

Thanks

If you don’t want to write sql_store.orders
You need to make sure to select the database you want to query prior to opening a new query tab.
Or
You can use the ‘USE’ statement
example:

USE sql_store; – or which ever database you want to query
– Don’t forget to end the query with a semicolon

SELECT *
FROM orders
JOIN customers
ON orders.customer_id = customers.customer_id;

Thanks for your reply!

How can I do this without ‘USE’ statement:

‘‘You need to make sure to select the database you want to query prior to opening a new query tab.’’
?

Select the database you want to query from the schemas section in the navigator window on the left. - Make sure its in bold then select create new query tab

Hi !
Sure
I selected sql_store and then a new query tab above. But it will open my local disk instead of new query.

Thanks

You have selected ‘open SQL Script’
Select ‘Create new SQL tab’

Thank you , It worked very well !