Last answered:

31 Aug 2022

Posted on:

29 Aug 2022

0

Resolved: Calling a Table with Database Name

Hello,

I noticed a small difference in how we call the 'departments_dup' table when we ALTER it twice.

In the first one (Change dept_name constraint to allow NULL), we use:

ALTER TABLE departments_dup

image.png

but in the second ALTER (Add a dept_manager column), we use:

ALTER TABLE employees.departments_dup

image.png

I was just curious, is the 'employees.' before the table name necessary when we add a new column?

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

31 Aug 2022

0

Hi Carl!
Thanks for reaching out.

No, it is not needed. However, it is used to show that this is also a correct syntax.

Hope this helps.
Best,
Tsvetelin

Submit an answer