English

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 -

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?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×
Our website is made possible by ad-free subscriptions or displaying online advertisements to our visitors.
If you don't like ads you can support us by buying an ad-free subscription or please consider supporting us by disabling your ad blocker. Thank you.