Answer : There will be 50 records will be return on cross join on table. because cross join perform Cartesian join where each records from first table multiply with second table.
Question 2 : How to delete DUPLICATE records from Table using SQL query ?
DELETE FROM EMP WHERE ROWID IN (
SELECT ROWID FROM(
SELECT ROWID,
ROW_NUMBER() OVER(PARTITION BY EMPLOYEE_ID,NAME,SALARY ORDER BY EMPLOYEE_ID) AS ROW_NUMBER
FROM EMPLOYEE)
WHERE ROW_NUMBER > 1)
Question 3 : How to read TOP 10 records from a table using a SQL query?
Answer: SELECT * FROM Departments WHERE ROWNUM <= 5
Question 4 : What will be output on inner Join on two table?
Question 5: What will be output of Left Join on two table.?
Question 6: What will be output of Right Join on two table.?
Question 7 : How to find the employee with second MAX Salary using a SQL query?
SELECT
Employee_Id,
Name,
Salary
FROM(
SELECT
Employees.*,
DENSE_RANK() OVER(ORDER BY Salary DESC) as SALARY_RANK
FROM Employees
)
WHERE SALARY_RANK =2;