-
Produce a List of 5 Highest Revenue Transactions
You need to produce a list of the five highest revenue transactions from the Orders table in the Sales database. The Orders table is defined as follows:CREATE TABLE Orders ( OrderID Int IDENTITY NOT NULL, SalesPersonID Int NOT NULL, RegionID Int NOT NULL, OrderDate Datetime NOT NULL, OrderAmount Int NOT NULL ) Which statement will produce the report correctly?...
-
Intent Shared Lock
Which one of the following is descriptive of the effect of an Intent Shared Lock on other transactions? CHOICE1: A Read Lock that prevents writes CHOICE2: A Read Lock that prevents other reads CHOICE3: A Read Lock that prevents more restrictive Locks CHOICE4: A Read Lock that allows other reads CHOICE5: A Read Lock that allows writes (Dirty Reads)
-
-
-
What is abstraction?
Abstraction is of the process of hiding unwanted details from the user.
-
What is a scope resolution operator?
A scope resolution operator (::), can be used to define the member functions of a class outside the class.
-
Suppose a customer table is having different columns like customer no, payments.What will be the query to select top three max payments?
SELECT customer_no, payments from customer C1WHERE 3<=(SELECT COUNT(*) from customer C2WHERE C1.payment <= C2.payment)
-
What is a OUTER JOIN?
Outer Join--Its a join condition used where you can query all the rows of one of the tables in the join condition even though they don’t satisfy the join condition.
-
Which is more faster - IN or EXISTS?
EXISTS is more faster than IN because EXISTS returns a Boolean value whereas IN returns a value.
-
When do you use WHERE clause and when do you use HAVING clause?
HAVING clause is used when you want to specify a condition for a group function and it is written after GROUP BY clause. The WHERE clause is used when you want to specify a condition for columns, single row functions except group functions and it is written before GROUP BY clause if it is used.
-
There is a % sign in one field of a column. What will be the query to find it?
'' Should be used before '%'.
-
There is a string 120000 12 0 .125 , how you will find the position of the decimal place?
INSTR('120000 12 0 .125',1,'.')output 13
-
What is difference between SQL and SQL*PLUS?
SQL*PLUS is a command line tool where as SQL and PL/SQL language interface and reporting tool. Its a command line tool that allows user to type SQL commands to be executed directly against an Oracle database. SQL is a language used to query the relational database(DML,DCL,DDL). SQL*PLUS commands are used to format query result, Set options, Edit SQL commands and PL/SQL.
-
How you will avoid duplicating records in a query?
By using DISTINCT
-
-
What is difference between UNIQUE and PRIMARY KEY constraints?
A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PK are automatically define NOT NULL, whereas a column that compose a UNIQUE is not automatically defined to be mandatory must also specify the column is NOT NULL.
-
What are various privileges that a user can grant to another user?
SELECTCONNECTRESOURCES
-
What is a view ?
A view is stored procedure based on one or more tables, it’s a virtual table.
-
What is difference between Rename and Alias?
Rename is a permanent name given to a table or column whereas Alias is a temporary name given to a table or column which do not exist once the SQL statement is executed.
-
What are different Oracle database objects?
TABLESVIEWSINDEXESSYNONYMSSEQUENCESTABLESPACES etc