Consider the following tables in a database called SPORTS. GAMES GID | GNAME |…

PYQ KVS TGT/PGT 2023

Consider the following tables in a database called SPORTS.

GAMES
GID | GNAME | FEES
G01 | Football | 300
G02 | Cricket | 1000
G03 | Basketball | 500

PLAYERS
PID | PNAME | SEX | GID
P101 | Amrita | F | G03
P103 | Ameena | F | G02
P107 | Angel | F | G02
P109 | Aman | M | G03

Which is the best command to display the player name (PNAME) and the respective game name (GNAME)?

  1. A.

    SELECT PNAME, GID FROM PLAYERS;

  2. B.

    SELECT PNAME, GNAME FROM GAMES, PLAYERS WHERE GAMES.GID=PLAYERS.GID;

  3. C.

    SELECT PNAME, GNAME FROM GAMES, PLAYERS;

  4. D.

    SELECT PNAME, GNAME FROM GAMES, PLAYERS WHERE PLAYERS.PID=GAMES.GID;

Attempted by 1956 students.

Sign up free to check your answer

Sign up free

Explore the full course: Kvs Nvs Tier 2 Computer Science

Loading lesson…