Database-Management-System
October 4, 2023Computer-Networks
October 4, 2023SQL
Question 1 |
A relational database contains two tables student and department in which student table has columns roll_no, name and dept_id and 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 (l, '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
0 row and 4 columns | |
3 rows and 4 columns | |
3 rows and 5 columns | |
6 rows and 5 columns |
Question 1 Explanation:
Simply, cartesian product of two tables will result
rows = 3 * 2 = 6
Columns = 3 + 2 = 5
rows = 3 * 2 = 6
Columns = 3 + 2 = 5
Correct Answer: D
Question 1 Explanation:
Simply, cartesian product of two tables will result
rows = 3 * 2 = 6
Columns = 3 + 2 = 5
rows = 3 * 2 = 6
Columns = 3 + 2 = 5
Subscribe
Login
0 Comments