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