A relational database contains two tables, student and department. The student…

GATE · 2004 · IT

A relational database contains two tables, student and department. The student table has columns roll_no, name, and dept_id; the department table has columns dept_id and dept_name. The following INSERT statements were executed successfully to populate the empty tables:

INSERT INTO department VALUES (1, 'Mathematics');
INSERT INTO department VALUES (2, 'Physics');
INSERT INTO student VALUES (1, 'Navin', 1);
INSERT INTO student VALUES (2, 'Mukesh', 2);
INSERT INTO student VALUES (3, 'Gita', 1);

How many rows and columns will be retrieved by the following SQL statement?

SELECT * FROM student, department;
  1. A.

    0 row and 4 columns

  2. B.

    3 rows and 4 columns

  3. C.

    3 rows and 5 columns

  4. D.

    6 rows and 5 columns

Attempted by 1026 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…