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.
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;
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