0% found this document useful (0 votes)
8 views1 page

Slip 26 GamePlayer

Three tables were created in the SQL database: gameMIT34 for games, playermit45 for players, and game_player_mit456 to link games with players. The gameMIT34 table includes games like Chess, Football, and Cricket with their respective player counts and club names. The playermit45 table lists players with their IDs, names, addresses, and club affiliations.

Uploaded by

Rashmi Angane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Slip 26 GamePlayer

Three tables were created in the SQL database: gameMIT34 for games, playermit45 for players, and game_player_mit456 to link games with players. The gameMIT34 table includes games like Chess, Football, and Cricket with their respective player counts and club names. The playermit45 table lists players with their IDs, names, addresses, and club affiliations.

Uploaded by

Rashmi Angane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

SQL> create table gameMIT34

2 (
3 gname varchar(20) primary key,
4 nop integer CHECK(nop > 0),
5 cname varchar(20)
6 );

Table created.

SQL> create table playermit45


2 (
3 pid integer primary key,
4 pname varchar(20),
5 paddr varchar(30),
6 clubname varchar(20)
7 );

Table created.

SQL> create table game_player_mit456


2 (gname varchar(20),
3 foreign key(gname) references gameMIT34,
4 pid integer,
5 foreign key(pid) references playermit45
6 );

SQL> select * from gameMIT34;

GNAME NOP CNAME


-------------------- --------- --------------------
Chess 2 Preksha
Football 11 Ronika
Cricket 12 Shakti

SQL> select * from playermit45;

PID PNAME PADDR CLUBNAME


--------- -------------------- ------------------------------ --------------------
1 John Delhi MIT
2 Alex Milan Sports Club
3 Adam Dortmund Zee Club

SQL> select * from game_player_mit456;

GNAME PID
-------------------- ---------
Football 3
Chess 3
Cricket 1

You might also like