H. Looking at your current database, you have realized a flaw in the current str
ID: 3890185 • Letter: H
Question
H. Looking at your current database, you have realized a flaw in the current structure. In the company table, you have allocated 15 characters in the tac column to record the TAC's rank and last name. There are TACs with the same last name! Write the appropriate SQL query to modify the tac column so that it can store 45 characters. Do not alter any of the data! After executing your query, the structure of your company table should like the result below: Field id barracks varchar(15) YES tac Null Key Default Extra Type varchar(2) NO PRI ULL varchar(45) YESExplanation / Answer
SQL ALTER TABLE Statement
We can use the ALTER TABLE statement is used to add, delete, or modify columns and columns data type in an existing table.
We can also ALTER TABLE statement to add and drop various constraints on an existing table.
Syntax To Change The Column Size
ALTER TABLE table_name
MODIFY COLUMN column_name datatype;
Query
Alter Table Company Modify Column tac varchar(45)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.