You have 15 records in EMP Table and 5 records in DEPT table.
What will be the output of the following SQL statement?
SELECT
FROM EMP DEPT
Answers
Answer:
the output of the following SQL statement is 75
The output of the given SQL Statement is (Option C) 75.
Explanation:
Given SQL Statement is
SELECT COUNT(*) FROM EMP, DEPT;
Where, the EMP table contains 15 records and the DEPT Table contains 5 records.
When you use the syntax SELECT COUNT(*) FROM TABLE1, TABLE2; it does the cross product of two tables, as in TABLE1 X TABLE 2.
So, here the given SQL statement does the cross product of EMP and DEPT tables as EMP X DEPT.
The cross product is nothing but each record in table 1 is joined with each record in table 2.
So, the total number of records formed by EMP X DEPT is 15 x 5 = 75.
So, the count of the formed table by cartesian product is 75.
Therefore, the output of the given SQL Statement is (Option C) 75.
Learn more:
1. What are the maximum and the minimum number of rows returned by the R1 right outer join R2?
brainly.in/question/21195376
2. Noisy values are the values that are valid for the dataset but are incorrectly recorded. Is it?
brainly.in/question/6658996