Write SQL Commands
Write SQL Commands
Write SQL commands and their outputs based on the given tables of Database
‘Sport’:
Table: GAME
Table: COACH
15. Add a column ‘PHNO’ of data type varchar(15) to the table COACH.
16. Delete the data from GAME table where SNAME is ‘SHOT PUT’.
17. Set the Column CCODE in the table COACH as Primary Key.
mysql> Alter table COACH
-> ADD Primary key (Ccode);
Query OK, 6 rows affected (0.02 sec)
Records: 6 Duplicates: 0 Warnings: 0
18. Make SCODE as the foreign key of the table COACH with reference to GAME
table.