MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Use what to separate multiple table names in the FROM clause?
A
commas
B
periods
C
spaces
D
semicolons
Explanation: 

Detailed explanation-1: -The from clause is required in every select statement involving data from tables or views. Use it to list all the tables and views containing columns included in the select list and in the where clause. If the from clause includes more than one table or view, separate them with commas.

Detailed explanation-2: -Result: Each row of orders would multiply by each row of items, and the result would be as below. In SQL, to fetch data from multiple tables, the join operator is used.

Detailed explanation-3: -In the FROM clause, the name of the first table ( product ) is followed by a JOIN keyword then by the name of the second table ( category ). This is then followed by the keyword ON and by the condition for joining the rows from the different tables.

Detailed explanation-4: -In SQL we can retrieve data from multiple tables also by using SELECT with multiple tables which actually results in CROSS JOIN of all the tables. The resulting table occurring from CROSS JOIN of two contains all the row combinations of the 2nd table which is a Cartesian product of tables.

Detailed explanation-5: -With SQL, you can get information from columns in more than one table. This operation is called a join operation.

There is 1 question to complete.