If there are 10 rows in 'Emp' table and 5 rows in 'Department' table, how many rows will be displayed by the following query?
Answers
The output of the given SQL Statement is 50.
Explanation:
Given SQL Statement is
SELECT COUNT(*) FROM EMP, DEPARTMENT;
Where, the EMP table contains 10 records and the DEPARTMENT 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 DEPARTMENT tables as EMP X DEPARTMENT.
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 DEPARTMENT is 10 x 5 = 50.
So, the count of the formed table by cartesian product is 50.
Therefore, the output of the given SQL Statement is 50.
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
3. You have 15 records in EMP Table and 5 records in DEPT table.
https://brainly.in/question/40818627