Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Last answered:

06 Feb 2023

Posted on:

06 Feb 2023

1

Suggestion for coding SQL

I would suggest that a best practice for coding SQL, in the FROM  statement is to always use "database.table", instead of utilizing the "USE" command every time so that SQL knows what database you are referencing. In a corporate environment, you may be referencing the same table name under different databases. We had different databases for each product line with the same (or similar) table structures). SQL for one product line may not be the same for each product line. So I believe a best practice is always to reference the "database.table" combination.

1 answers ( 0 marked as helpful)
Instructor
Posted on:

06 Feb 2023

0

Hi Michael!
Thanks for reaching out.

Thanks for sharing this piece of information with the Community!
The idea is to select a particular database and work with its tables. So, we can simply double-click on the DB and in this way we select it for our work.

Hope this helps.
Best,
Tsvetelin

Submit an answer