Consider the following tables in a database SPORTS : Table 1 : STUDENTS
Consider the following tables in a database SPORTS :
Table 1 : STUDENTS
ADMNO | SNAME
101 | AMAR
205 | MARIA
410 | MALALA
Table 2 : GAMES
GAMEID | GNAME
G03 | CRICKET
G05 | FOOTBALL
Which of the following SQL Command will produce an output as :
SNAME | GNAME
AMAR | CRICKET
MARIA | CRICKET
MALALA | CRICKET
AMAR | FOOTBALL
MARIA | FOOTBALL
MALALA | FOOTBALL
Show answerHide answer
Correct answer: (A) SELECT SNAME, GNAME FROM STUDENTS, GAMES;
Explanation
Listing two tables with no join condition gives their Cartesian product: every student paired with every game (3 × 2 = 6 rows), which matches the output.