-
How can you retrieve the numeric values from varchar2 type column?
Hi Friends, One table is there. It is having varchar2 type column and this column having both numeric and alphanumeric values but I want to retrieve only numeric related values from that table. If it is possible then say the answer plz... I will wait for ur tremendous answer...
-
-
-
-
-
Difference between procedure and function.
Functions are named PL/SQL blocks that return a value and can be called with arguments procedure a named block that can be called with parameter. A procedure all is a PL/SQL statement by itself, while a Function call is called as part of an expression.
-
Birthdate Query
There is a table friends having following detailsName BirthdayJohn 28-jun-1985Peter 27-aug-1987Tom 13-aug-1986Nick 29-apr-1987Natalia 25-apr-1984Kate 28-jun-1984Wilson 11-nov-1987krish 31-jul-1987robert 25-apr-1984
SELECT names of the friends which come on the same day.. condition you don't know which birthday's repeat
SELECT... -
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 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 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.
-
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.
-
What is CoRelated SubQuery
A subquery within a subquery
-
-
-
-
Retrieve Odd and Even Rows
How to retrieve odd and even number of rows from a table?
-
There is a % sign in one field of a column. What will be the query to find it?
'' Should be used before '%'.
Oracle SQL Interview Questions
Ans