The correct answer is A. The ALTER command is a DDL command to modify the structure of existing tables in the database by adding, modifying, renaming, or dropping columns and constraints. Use the ALTER TABLE RENAME command to rename column names. Example: ALTER TABLE table_name
RENAME COLUMN old_column_name TO new_column_name;
A.ALTER. That said, this is really for the sake of learning about DDL/DML etc, and it would be better if they could update that question to ask about removing a column rather than renaming a column. Reason is that those working using SQL Server Management Studio will use the EXEC sp_rename to rename a column as opposed to (I presume) MySQL, Oracle etc. I tried many combinations to rename a column in my Azure Data Studio using ALTER statements (tried ALTER COLUMN, MODIFY, RENAME, CHANGE etc) and nothing worked. Then I executed this sp_rename and it worked no problem - though we also need to be careful about renaming columns as it can affect stored procedures and other things apparently. Anyways, if anyone wants to try, they can find the full EXEC sp_rename statement here: https://docs.microsoft.com/en-us/sql/relational-databases/tables/rename-columns-database-engine?view=sql-server-ver15
None of the above, changing column should be done by using a procedure
EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN';
reference :
https://docs.microsoft.com/en-us/sql/relational-databases/tables/rename-columns-database-engine?view=sql-server-ver15
Ok, my bad! :( in MySql you can use "alter" but every mssql helper says u need to use built in procedure.
upvoted 1 times
...
...
...
This section is not available anymore. Please use the main Exam Page.98-364 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
nxp1968
Highly Voted 4 years, 11 months agodzoni68
Most Recent 3 years agoMorgane
3 years, 8 months agomoehijawe
5 years, 6 months agoakkkkkkk
5 years, 1 month agoJovial
5 years agoJovial
5 years agowariusw
4 years, 3 months agowariusw
4 years, 3 months ago