मराठी

Zack is working in a database named SPORT, in which he has created a table named “Sports” containing columns SportId, SportName, no_of_players,

Advertisements
Advertisements

प्रश्न

Zack is working in a database named SPORT, in which he has created a table named “Sports” containing columns SportId, SportName, no_of_players, and category.

After creating the table, he realized that the attribute, category has to be deleted from the table and a new attribute TypeSport of data type string has to be added. This attribute TypeSport cannot be left blank. Help Zack write the commands to complete both the tasks.

टीपा लिहा
Advertisements

उत्तर

To delete the attribute, category:

ALTER TABLE Sports
DROP category;

To add the attribute, TypeSport

ALTER TABLE Sports
ADD TypeSport char(10) NOT NULL;
shaalaa.com
Data Types and Constraints in MySQL
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2023-2024 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×