Advertisements
Advertisements
Question
Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the Query for the following:
Change the name of the relation TEAM to T_DATA. Also, change the attributes TeamID and TeamName to T_ID and T_NAME respectively.
Short Note
Solution
ALTER TABLE TEAM
RENAME TO T DATA:
ALTER TABLE T_DATA
RENAME COLUMN TeamID TO T_ID;
ALTER TABLE T_DATA
RENAME COLUMN TeamName TO T_NAME;
shaalaa.com
Data Types and Constraints in MySQL
Is there an error in this question or solution?