Last answered:

11 Jan 2023

Posted on:

11 Dec 2021

0

Why we need to repeat dept_no and dept_name in CHANGE COLUMN?

Why we need to repeat dept_no and dept_name in CHANGE COLUMN?

1 answers ( 0 marked as helpful)
Posted on:

11 Jan 2023

0

Hey Nurul,

The second time we say the column name, that's where SQL expects us to write down the new, desired name.

For example, if we instead wrote "dept_no department_number", we'd rename the "dept_no" column to "department number".

By repeating it, we tell SQL that we want to keep the same name.

Submit an answer