Computer Science - Class 12
Solutions to CBSE Sample Paper - Computer Science Class 12

(a) Consider the following tables – Bank_Account and Branch:

Table: Bank_Account

ACod

Name 

Type
A01  Amrita Savings
A02   Parthodas Current
A03   Miraben Current

Table: Branch

ACode 

City
A01  Delhi
A02  Mumbai
A01  Nagpur

What will be the output of the following statement?

SELECT * FROM Bank_Account NATURAL JOIN Branch;

 

Answer:

Question 26(a) -Teachoo.png

Explanation:

Natural join compares columns of both tables and combines rows of both the tables based on columns that have the same name and data type in both the tables. The resultant table will have the common column only once.

In the tables Bank_Account and Branch, ACode is the common column and its data type is the same in both tables. So, the two tables are combined based on the column ACode.

Ask a doubt
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.