Write a SQL query to find the 10th highest employee salary from an Employee table. Explain your answer. (Note: You may assume that there are at least 10 records in the Employee table.) View answer This can be done as follows: SELECT TOP (1) Salary FROM ( SELECT DISTINCT TOP (10) Sa...
and the outer query is known as the main query in the Database. The implementation of subqueries is always done first, and the outcome of the following is always passed on to the main query.
SQL Job Interview Questions and Answers 1 :: What is SQL (Structured Query Language)? SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database.Read More 2 :: What is the SQL*Plus? SQL*Plus is an application that recognizes &...
SQL stands for Structured Query Language , and it is used to communicate with the Database. This is a standard language used to perform tasks such as retrieval, updation, insertion and deletion of data from a database. 7. What is a unique key? A Unique key constraint uniquely identified e...
SQL INTERVIEW QUESTIONS AND ANSWERS 13 | P a g e 45.What is Self-Join? Self-join is query used to join a table to itself. Aliases should be used for the same table comparison. 46. What is Cross Join? Cross Join will return all records where each row from the first table is combin...
7. What is a Query? A query, in SQL, is a command used to request data or update information from a database table or combination of tables. Users can write and execute queries to retrieve, delete or update information in a database. Usually, a query response returns data from different...
Can you write a query that will help the owner of Cocoa Confections find the COUNT of all orders placed in 2016, by customer e-mail address, sorted descending? I've got an answer I need a hint Ace your SQL interview — Free mini-course Make sure you're prepared for the interview th...
Self join is just like any other join, except that two instances of the same table will be joined in the query. Here is an example: Employees table which contains rows for normal employees as well as managers. So, to find out the managers of all the employees, you need a self join....
For example, the query below creates a packageemployee_pkgthat defines a procedure to raise an employee's salary and a function to retrieve the total number of employees, with their implementations to be provided in the package body. -- Create a package named 'employee_pkg'CREATEPACKAGE employe...
UNION - returns all distinct rows selected by either query UNION ALL - returns all rows selected by either query, including all duplicates. Q. What is ROWID ? ROWID is a pseudo column attached to each row of a table. It is 18 character long, ...