Professional Documents
Culture Documents
Answers
|
Date
Jump to Page:
1
JAN
152016
07:09 AM
583
Views
3
Ans
Dual Table
o
RAJAT RAHUL
Is Dual Table updatable? If we update, will it impact the health of the database?
Anshul Nagar
o
Feb 3rd, 2016
We cannot update it, a dual table is a dummy table with one row and any no. of columns.
sujata
o
Jan 19th, 2016
No we cannot update dual table. It is in-built table with one row and one column.
Answer Question
DEC
09:32 AM
312009
4838
Views
2
Ans
SQL Optimization
o
kunalpurbey
o
Jan 20th, 2016
Try to make use of mqts or temporary tables if possible ..try to transfer the conditions from non key
columns to key columns
ace1234567
o
Mar 4th, 2015
update the statistics of all the tables used in the query. Check the explain plan. Check whether query
is using the existing indexes. If required add/modify new indexes. Check for the sequence of cond...
Answer Question
OCT
172006
03:30 AM
30074
Views
10
Ans
raj
sujata
o
Jan 19th, 2016
Pragma AUTONOMOUS_TRANSACTION instructs the compiler to treat the PL/SQL block
following the pragma as autonomous (independent) from the calling transaction. Pragma can be
applied on:- 1) Anonymous PL...
kitti
o
Dec 19th, 2015
An autonomous transaction is an independent transaction initiated by other transaction -When an
autonomous transaction is called the parent transaction is currently suspended. -We can commit or
rollba...
Answer Question
FEB
092007
08:23 PM
7215
Views
4
Ans
madhuk17
Praveen kumar
o
Both are same
Naresh Bandla
o
Dec 1st, 2015
Stand Alone Procedure: A procedure which is not enclosed in a package is called Stand Alone
Procedure.
Stored Procedure: A Procedure which is defined in Package is called Stored Procedure and if we
want to call that procedure out of package is to use .
Answer Question
DEC
202006
06:13 AM
12502
Views
9
Ans
Mrigen
sachin rasal
o
Dec 11th, 2015
Materialised view - A table on a disk that contains the result set of a query
Non-materiased view - A query that pulls data from the underlying table
Sathish
o
Jun 12th, 2012
Materialized views are objects that are used in base table that can be Summarized Group, and
aggregated with the base table.This materialized views are used in data-ware housing and decision
support system.
Answer Question
022005
SEP
06:41 AM
190494
Views
41
Ans
A PROCEDURE may
1. Function is mainly used in the case where it must return a value. Where as a procedure may or
may not return a value or may return more than one value using the OUT parameter.
2. Function can be called from SQL statements where as procedure can not be called from the sql
statements
3. Functions are normally used for computations where as procedures are normally used for
executing business logic.
4. You can have DML (insert,update, delete) statements in a function. But, you cannot call such a
function in a SQL query.
5. Function returns 1 value only. Procedure can return multiple values (max 1024).
6.Stored Procedure: supports deferred name resolution. Example while writing a stored procedure
that uses table named tabl1 and tabl2 etc..but actually not exists in database is allowed only in during
creation but runtime throws error Function wont support deferred name resolution.
7.Stored procedure returns always integer value by default zero. where as function return type could
9.A procedure may modify an object where a function can only return a value The RETURN
statement immediately completes the execution of a subprogram and returns control to the caller.
Giri
o
Dec 2nd, 2015
DML statement can be used in function also.
Shalini
o
Jul 23rd, 2014
function can be called from trigger. 1.CREATE OR REPLACE TRIGGER emp_trig 2. before
INSERT ON emp 3. FOR each row 4.--referencing old as old and new as new 5.declare 6. i
pls_integer; 7.begi...
Improve Answer
132015
MAY
03:27 AM
6193
Views
6
Ans
Mayur
1. How to load excel data into oracle database by using sql loader?
2. What are the ways to load data from excel file in oracle database ?
Naresh Bandla
o
Dec 1st, 2015
You can upload the Excel file into tables by many approaches, I will explain here in two methods. 1.
Loading data using Loader programs: Convert your excel file into CSV file and create control as pe...
ashay
o
Nov 13th, 2015
Best and most easy way is to use an external table. Keep the file in designated location and file will
automatically loaded into table every time you put a new file or update the file. Create trigger on the
given table to load the data into respective tables.
Answer Question
AUG
192010
11:36 AM
10113
Views
11
Ans
Drop Vs Truncate
o
kalabaggam
o
Nov 26th, 2015
TRUNCATE means it deletes the table data but the table structure remains as it is. Whereas in DROP
command it deletes the table data as well as its structure also.
subbarao
o
Nov 6th, 2015
I have one doubt which is one is faster some people said comp with drop truncate very faster but
some one drop very faster comp with truncate.
Answer Question
DEC
012006
02:31 AM
36572
Views
13
Ans
be17be
Lokesh
o
Nov 18th, 2015
A mutating table is a table that is being modified by an UPDATE, DELETE, or INSERT statement.
The session that issued the triggering statement cannot query or modify a mutating table. If you must
up...
maxin john
o
Jun 8th, 2015
Soo...... how you are going to use that lelel trigger :O
Answer Question
OCT
062012
12:56 PM
6638
Views
3
Ans
Bulk binding
o
sidd_130
o
Nov 12th, 2015
A new feature called "bulk binds" was added to PL/SQL back in Oracle 8i . Bulk binds enable a
PL/SQL program to fetch many rows from a cursor in one call instead of fetching one row at a time.
Bulk bin...
amala
o
Jun 24th, 2015
It retreives multiple rows with a single fetch...It increases the performance by reducing no.of context
switches
Answer Question
FEB
072006
06:21 AM
47055
Views
12
Ans
What is cursor? Explain the types of cursor and write one implicit
cursor program to check how many records deleted from table?
o
indranil
gagan
o
Nov 9th, 2015
Oracle uses the work area for its internal processing in order to execute a SQL statement is known as
a cursor.
shivigupta
o
Oct 4th, 2012
Set serveroutput on;
begin
delete from employ where empid = 1;
commit;
dbms_output.put_line(NO of records deleted||sql%rowcount);
end;
Answer Question
MAR
072015
03:58 AM
5092
Views
4
Ans
Nagendar
Ram Devineni
o
Nov 3rd, 2015
Alter session set nls_date_format=mon-dd-yyyy hh:mi:ss
/
Purvesh Khanna
o
May 5th, 2015
If you are using sql developer then go to Tools ->> Preference ->> Database ->> NLS -->> Date
Format.
Send the format as you want.
Answer Question
MAR
082006
05:09 AM
10004
Views
15
Ans
vivek
Ram
o
Oct 29th, 2015
You can create n number of triggers on a table but maximum types of triggers you can create are 12.
Ratnesh gupta
o
Apr 2nd, 2015
There is no technical limit on the number of triggers you define (or, at least, not one that any rational
person has ever hit). It generally wouldnt make sense to have more than one trigger of a given...
Answer Question
NOV
072005
02:01 AM
8408
Views
13
Ans
maheshwari
hardeep singh
o
Oct 16th, 2015
The (dbms_output) is library and the (put_line) is the function declared inside library
aravinthancse
o
Dec 27th, 2011
DBMS_OUTPUT - is a Oracle supplied package. put_line() is a DBMS_OUTPUT packages inbuilt
procedure. put_line() is a combination of two inbuilt procedures such as put() and new_line().
procedure put()...
Answer Question
NOV
052006
01:11 AM
7488
Views
11
Ans
basukolur014
Saurabh Singh
Table level constraints are defined for compound constraints like primary key involving more than
one col and have the flexibility to provide user defined names to these which is not possible in case
of col level constraints. Only NOTNULL constraints cant be defined as table level.
krishna mistry
o
Oct 10th, 2015
No difference in column level and table level constraints.
Answer Question
052008
SEP
05:46 AM
4011
Views
3
Ans
ramesh.akula9
o
Oct 3rd, 2015
For Tab delimiter You can use 0x 09
gaurav
o
Sep 26th, 2015
Fields Terminated by X09 use this
Answer Question
DEC
082014
06:46 AM
6601
Views
4
Ans
Revathi
If i insert record in table A and these record should update in table B by using Trigger.How to
achieve this.
Trigger - insert into one table update into another table
Nagendra
o
Sep 10th, 2015
"sql CREATE TRIGGER update_trigger ON CUSTOMER_info FOR update AS BEGIN IF
UPDATE (cust_name) OR UPDATE (contact) BEGIN INSERT INTO update_log ( cus...
Avinash
o
Aug 10th, 2015
We can use instead of trigger in this case
Answer Question
APR
262006
12:38 AM
22159
Views
12
Ans
GIRISH H.R.
sai balaji
o
Sep 8th, 2015
Basically we have 13 types of triggers. 1.Row level triggers (6 types) 2.Statement level triggers (6
types) 3.Instead of trigger Row Level Triggers: before insert on each row before update on each r...
mahamadalig
o
Apr 17th, 2012
Before trigger
after trigger
row level trigger
statement level trigger
Answer Question
AUG
112015
01:28 PM
3120
Views
1
Ans
PL/SQL Triggers
o
wajid
How many types of PL/SQL Triggers are there? What are they?
sravanthi
There are two different types of triggers: - Application Triggers - Database Triggers An application
trigger fires whenever an event occurs within a particular application. A database trigger fire...
Answer Question
AUG
062015
08:27 AM
2993
Views
1
Ans
How to tune package, how can we see the output, which logic
taking more time to execute?
o
SHikha
Anjani Kumar
o
Aug 9th, 2015
We can use oracle supplied package DBMS_HPROF(New in 11g) to see which procedure and inside
that which sql is taking taking more time to execute.DBMS_HPROF Package profiles subprogram
calls also with ...
Answer Question
Sort by:
Answers
|
Date
Jump to Page:
2
OCT
192005
02:51 AM
13873
Views
22
Ans
sadik
Yes, we can use the TCL commands(commit/rollback) in the exception block of a stored
procedure/function. The code in this part of the program gets executed like those in the body without
any restriction. You can include any business functionality whenever a condition in main block(body
of a proc/func) fails and requires a follow-thru process to terminate the execution gracefully!
Leena Roja
o
Jul 13th, 2015
Correct Subhash..
Susil Kumar Nagarajan
o
Jan 20th, 2012
Yes. You can very well use COMMIT or ROLLBACK in exception block. But it is not a good idea to
use, as it will commit the previous transactions in the same PLSQL block. Make use of creating
SAVEPOINTS and commiting them when required.
Improve Answer
JUL
272009
02:06 AM
24241
Views
6
Ans
sri3241
o
Jun 26th, 2015
Best way to define disadvantage of cursor is context switching, if the execution switches from
PLSQL engine to SQL engine and vise versa, then execution time will increase and finally end up
with longer time to complete the whole process.
Manoj Singh
o
Jun 25th, 2015
Strongely Suggested aviod to use cursor becuase it is very slow, if you have good knowledge of joins
you can replace cursor with join
Answer Question
NOV
212011
12:33 AM
12279
Views
5
Ans
sateeshkonthala
Explain what is Simple Cursor and What is Parameterized Cursor? And Difference between
both??
amala
o
Jun 25th, 2015
Cursor is a private SQL area which is used to retrieve multiple rows from one or more tables. The
cursor which uses parameter is called parameterised cursor. Based on the given parameter value
the cursor will execute.
abinay
o
Oct 5th, 2012
Cursors having some private area.which is used for store the data from sql statements.Normal cursors
we don't have use any parameters.but parametrized cursors are used the parameters,which is executed
based upon the parameter.
Answer Question
MAR
252007
11:49 PM
41520
Views
27
Ans
subbaraovangalli
Malyadri M
Code
o
SELECT ROWID,
E.*
FROM
EMP E
FROM
EMP1 E1
WHERE
E.ENO
E1.ENO
);
Rashid
o
Here It is:
Code
o
SELECT * FROM
tablename a
a.ROWID
WHERE
>
ANY
(SELECT
b.ROWID
FROM
WHERE
AND
Answer Question
2.
tablename b
a.fieldname
a.fieldname2
DEC
202006
06:12 AM
11459
Views
3
Ans
b.fieldname
=
b.fieldname2)
Mrigen
igornem
o
Jun 6th, 2015
There is no term "Atomic transaction". There is term "Transaction" which is must have ACID
properties, and first "A" in "ACID" is - "Atomicity", which is defines that series of operations
included in ...
madhaviguthula
o
Feb 28th, 2007
Autonomous transactions are independent transactions that can be called from within another
transaction. An autonomous transaction lets you leave the context of the calling transaction, perform
some S...
Answer Question
192015
MAY
02:42 AM
2703
Views
2
Ans
Sasmita
Yes it is possible to use Return in exception block of pl/sql. Example: "oracle8 CREATE OR
REPLACE FUNCTION [(input/output variable declarations)] RETURN return_type [AUTHID ...
Kamal
o
May 23rd, 2015
Yes, you can return from exception block. example: create or replace function TestReturn return
varchar2 is Result varchar2(1);--size 1 begin Result := 123;--size 3 return Test; except...
Answer Question
052015
MAY
07:33 AM
1272
Views
0
Ans
Suparna
Answer Question
092004
SEP
06:04 AM
23197
Views
13
Ans
% ROWTYPE is to be used whenever query returns a entire row of a table or view. TYPE rec
RECORD is to be used whenever query returns columns of differenttable or views and
variables.
E.g. TYPE r_emp is RECORD (eno emp.empno% type,ename emp ename
%type); e_rec emp% ROWTYPE cursor...
Nupur
o
Apr 30th, 2015
This is my understanding: Declare : eno employee.emp_id%type - specifically tells you that the
variable type or data that it will be holding will be same as th e employee_id type in the employee
tabl...
Nupur
o
Apr 24th, 2015
When we declare a var as %row type, then the variable holds all the column type attributes.
Developer does not need to know what the individual column types are. Type record is used when we
declare a variable to be of the records of the table.
Answer Question
o
APR
192012
06:27 AM
9071
Views
7
Ans
dinaballavsahoo
During preparation of report in *.RDF , there are two things on date & to date
on date is the i/p value , but to date = 1st day of this month on date
how ?
pradeep
o
Apr 24th, 2015
SELECT TRUNC(SYSDATE,MM) FROM DUAL
Praveen
o
Apr 22nd, 2015
SELECT ADD_MONTHS(LAST_DAY(SYSDATE),-1)+1 FROM DUAL;
Answer Question
202012
SEP
08:15 AM
10526
Views
5
Ans
priyanka_sharma
What is the impact of using a stored proc or a function on the performance? Which has a better
performance? Also, why is it not possible to use DML in the functions called from a select
query?
Nupur
o
Apr 24th, 2015
Functions and procedures are both named blocks of statement . A function must return a value .
Performance wise if you want the program to return a single value use a function . You can use
out par...
Suchith Shivali
o
Apr 17th, 2015
1)In stored procedure you may or may not return value but in the function return is compulsory. 2)If
you want to return more than one value go for Stored procedure. 3)Once SP or function is created,...
Answer Question
o
NOV
212012
02:32 AM
5466
Views
2
Ans
santosh.rdg
We have a oracle package that package is calling in user defined package ?from this user
defined package how will u debug the oracle package?
ChandraSekhar thimmapthruni
o
Apr 15th, 2015
Use DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
Rohit
o
Jan 6th, 2013
Using trace_on utility
eg:- For HRMS hr_utility.trace_on ;
expression(here call the package which you want to debug);
HRMS hr_utility.trace_off;
Answer Question
MAR
052015
01:21 AM
3795
Views
2
Ans
Srividhya
A table has both before insert and after insert trigger. Also we have declared both the trigger as
pragma autonomous transaction for saving the error record alone in the error table if any
exception occurs. Now if we have a error in the trigger will the before insert trigger will get
executed and the error data will be stored in the error table?. what is the exact use of before and
after insert trigger...
DInesh Shukla
o
Apr 15th, 2015
As we declared pragma here. It will insert the record in error table if got fail during execution.
sukrathik
o
Mar 6th, 2015
If an autonomous transaction attempts to access a resource held by the main transaction, a deadlock
can occur. Oracle raises an exception in the autonomous transaction, which is rolled back if the exc...
Answer Question
o
JAN
112007
04:42 PM
12653
Views
5
Ans
sarada
Abhijit Musale
o
Mar 23rd, 2015
We can create a table in procedure by executing a string statement using EXECUTE IMMEDIATE or
using DBMS_SQL.EXECUTE.
veera
o
Nov 25th, 2013
It is possible by using Dynamic SQL.
By using EXECUTE IMMEDIATE.
Answer Question
o
NOV
092010
01:24 PM
4230
Views
4
Ans
PL/SQL Procedure
o
Pallavi_2507
What is the difference in CREATE or [REPLACE] Procedure and to drop a procedure and create
it again? What does REPLACE do, Does it drop the existing one and create the new one with
same name?
Abhijit Musale
o
Mar 23rd, 2015
PLSQL objects and views can be replaced if pre-exists using REPLACE keyword .
souvik
o
Nov 16th, 2014
If you drop the procedure, then all the privileges are gone which you will have to give again while
creating the program. But CREATE OR [REPLACE] command will keep the privileges intact.
Answer Question
o
NOV
242011
09:14 AM
11086
Views
3
Ans
Jaikumar D V
Explain the real-time situation where would you use Oracle Hits
Abhijit Musale
o
Mar 23rd, 2015
To override the flow of execution and priority of the execution we can use oracle optimizer hints.(e.g.
PARALLEL,APPEND,etc.)
kalpana
Optimizer hints are used with SQL statements to alter execution plans.We are suggesting oracle how
the statement should be executed.
syntax : /*+RULE */
Answer Question
o
MAR
152006
01:43 PM
14539
Views
20
Ans
How to return more than one value from a function?What are the
types of triggers?What are the features of oracle 9i
o
aseemnaithani
ace1234567
o
Mar 4th, 2015
Please find the template. Using out type parameter we can return more than one value from a
function.
Code
o
IS
BEGIN
FUN_TEST(var1
END;
shyam
o
Mar 2nd, 2015
Yes, we return more than one value in function using package. Example::
Code
o
is
(emp_id
emp_name employees.last_name%type);
end pack;
employees.employee_id%type,
JUN
262009
03:43 AM
2774
Views
1
Ans
mkansakar
How to access cursor output from web application and present the record set in tabular form?
ace1234567
o
Mar 4th, 2015
Using ref cursor and returning output in the plsql table we can return the result in tabular format.
Answer Question
o
FEB
262015
01:56 PM
2464
Views
1
Ans
Teenzh
How to optimise your pl/sql code? Not using explain plan which is for tuning the quey
ace1234567
o
Mar 4th, 2015
The best technique used is to avoid repeatative coding by putting repeated logic in a
subroutine/function. Save the DML operations after a specific interval or records
insertion/updation/deletions , depending on your archive log size.
Answer Question
o
JUL
172012
02:59 AM
9277
Views
12
Ans
sachinkshd
Shri
o
Feb 27th, 2015
Yes we can insert multiple null values as UNIQUE constraint allows multiple null values to insert
and also one null value cannot be compared with another null value.
Abhijit Musale
o
Feb 18th, 2015
If ur unique contains only one column then u can insert only one null. If u have 2 then u can insert
two null values but with different combinations like (1,null) and (null,1).
Answer Question
o
NOV
062014
02:03 AM
4300
Views
9
Ans
Use of Indexes
o
Sruthi
What are indexes used for ? What are the different types of Indexes?
lakshmi
o
Feb 20th, 2015
Index is schema object.which is an entry for each value that are appear index column.index used to
give a direct access and also increase the performance .
types of indexes:
simple,composite,function based,bitmap,bit treeindex
Abhijit Musale
o
Feb 18th, 2015
It is not necessary that adding an index will always help. When u have less no. of records then there
is no need to add index. An index is an additional database object to improve the data i/o operations.
Answer Question
Sort by:
Answers
|
Date
Jump to Page:
3
OCT
12:55 PM
062012
6123
Views
5
Ans
sidd_130
o
Feb 19th, 2015
Using PRAGMA AUTONOMOUS_TRANSACTION we can treat the child transaction as a separate
transaction, committing which wont affect the parent transaction.
Tushar
o
Feb 17th, 2015
No we cant used it.because it affected on logical processing. It is possible using Pragma
Answer Question
NOV
222014
04:08 AM
4280
Views
7
Ans
sandeep
o
Feb 18th, 2015
You can wrap/encrypt the package code .
jkcboys
o
Jan 4th, 2015
Packages will be pre-compiled components, will improve performance compare to standalone one.
Answer Question
FEB
172015
02:08 AM
1946
Views
1
Ans
vamsi1810
o
Feb 18th, 2015
Whenever you want to perform some operation on a set of result of rows , then we use the
cursor.Cursor is nothing but a work space allocated on the memory. When u fire a query that set of
rows is stored in the cursor temporarily.
Answer Question
FEB
172015
03:39 AM
2409
Views
1
Ans
AYAN BHAUMIK
Abhijit Musale
o
Feb 18th, 2015
To make the operations faster. When we need to do any operation on data like some calculations and
when u need to fetch the data repetitively , in that case we can use the collections like PLSQL table.
Answer Question
092013
MAY
11:00 PM
12464
Views
6
Ans
vinit0180
killvinkill
DECLARE
input varchar2(30);
reverse varchar2(30);
n integer(3);
BEGIN
input:=&input;
for n in reverse 1..length(input) loop
reverse:=reverse||substr(input,n,1);
end loop;
dbms_output.put_line(reverse);
end;
/
harsh
o
Sep 22nd, 2014
Answer:"plsql reverse a string in oracle : DECLARE V_string VARCHAR2(10):=SRIRAM;
V_reverse VARCHAR2(10):=null; V_string1 VARCHAR2(10); v_count NUMBER; BEGIN
v_count:=length(V_stri...
Answer Question
122007
SEP
12:58 AM
5965
Views
9
Ans
ricky
suvijyo
o
Jan 27th, 2015
Char datatype is fixed,but it cant be reused. eq: char(10) -- elena,first 5 characters will be filled
remaining field are padded.
varchar2 datatype fixed,but it can be reused. eq: varchar2(10) -- elena, first 5 characters will be filled
and remaining fields are reused.
Answer Question
DEC
052014
01:44 AM
3341
Views
4
Ans
Preeti Kulkarni
Eltonclardy
o
Jan 9th, 2015
Yes PL/SQL have different data types compared to C and C++. These two datatypes in SQL i.e scalar
and composite are very mush useful in SQL.
Hema nagaraju
o
Dec 19th, 2014
Scallar,composite datatypes.
scllar datatypes are varchar2,number
composite datatypes are records,tables,collections which can store multiple values at a time
Answer Question
JUL
242013
01:23 AM
14306
Views
14
Ans
shankar
Write a query to retrieve one entire column data of multiple rows into one single column of
single row?
hema nagaraju
o
Dec 20th, 2014
SELECT listagg (ename, ,) within group( order by ename) FROM emp
Geet
Code
o
FROM (SELECT
FROM
EMPLOYEE);
Answer Question
2. DEC
STRAGG(EMP_NAME) EMP_NAME
052014
10:16 AM
3145
Views
1
Ans
ram
Hi ,can any one tel pls what is use ofprocedures and packages? why we use can anyone tell me
with one real time example
HEMA NAGARAJU
o
Dec 20th, 2014
Procedures are dataobjects which are stored in a database. We can define an operation in procedure
and we call the procedure many times in the application. Packages are collection of subprograms,
pro...
Answer Question
o
JUN
142013
05:37 AM
14810
Views
10
Ans
raiyaans
In Emp table there is a column which consists of gender (Male or Female) ? How should one
Can update the Values of Male to Female and Female to Male with a single query ?
sandeep
o
Nov 22nd, 2014
I need to update in the table not to select can u guys show me how to change directly in the database
NARSIMHA
o
Nov 13th, 2014
SELECT DECODE(GENDER,M,F,F,M,NULL) FROM EMP
Answer Question
o
NOV
212014
02:09 AM
2263
Views
1
Ans
sandeep
o
Nov 22nd, 2014
This was used when you are going to use the cursor in more than one place with different values for
the same where clause.
Answer Question
o
JUL
01:47 AM
112009
4234
Views
1
Ans
sandeep.bawalia
How to call a Procedure in Trigger and if any exception occurs in trigger then How do we
rollback it?
Ayaz Uddin
o
Nov 20th, 2014
Create or replace trigger trg
after insert on emp
for each row
begin
myproc(:new.empno, :new.ename);
end;
Answer Question
o
NOV
132014
02:51 PM
5383
Views
3
Ans
sumit
Why we use cursor in plsql? in same case can we use cursor or procedure?? difference between
cursor , procedure and package?? is any relation between 3??
parul priya
o
Nov 20th, 2014
We use cursor when we need to handle multiple rows query in plsql.
Bhanuprasad
o
Nov 14th, 2014
Cursor in Plsql: When we execute sql query. The records fetched from sql query, information about
sql query is stored in context memory area in oracle. so in order to access each record row by row we
...
Answer Question
o
NOV
062014
02:05 AM
3047
Views
2
Ans
Sruthi
How can you move the entire data from one table to another? If in same instance and in different
instances, both cases?
KARTHIKA
o
Nov 6th, 2014
Use the below code to perform the task
Code
o
INSERT INTO
NEWTABLE(COLUMNNAME)
SELECT
FROM
OLDTABLE.COLUMNNAME
OLDTABLE
WHERE
OLDTABLE.COLUMNNAME=CONDITIONVALUE;
A MOHAN KUMAR
o
Nov 6th, 2014
INSERT INTO < old table > SELECT * FROM < new table > Note the table should have same
column name and their respective data types as old table
Code
o
INSERT INTO
Answer Question
2.
new_table_name
SELECT * FROM
EMP
JUN
102013
08:07 AM
10561
Views
4
Ans
How can we insert into a table by fetching data from more then
one table by using only single command
o
Nitin kumar
I have 3 tables , same no of columns ,i want to insert whole the data from all these table into a
single table,which also having same no of column and the same data type.
sateeshchandra
o
Oct 14th, 2014
"sql INSERT ALL INTO suppliers (supplier_id, supplier_name) VALUES (1000, IBM) INTO
suppliers (supplier_id, supplier_name) VALUES (2000, Microsoft) INTO customers (customer_i...
J. Ali (PL/Sql)
Answer Question
o
OCT
242012
06:10 AM
4102
Views
1
Ans
Web testing
o
Ramu.B
While testing a website, an image that is supposed to appear on a page does not load (for
example in IE, you would see an empty box with a small red cross icon). What type of
investigation could you carry out to find out what the cause of the problem is? What information
would you include when raising the defect
harmeet rehal
o
Oct 13th, 2014
Web testing is the name given to software testing that focuses on web applications. Complete testing
of a web-based system before going live can help address issues before the system is revealed to th...
Answer Question
122014
SEP
09:41 PM
3354
Views
2
Ans
Recursive function
o
manju_kambar
o
Oct 11th, 2014
It is function that calls itself to implement some repetitive task
VIVEK
o
Sep 24th, 2014
Function is calling the same function
Answer Question
122014
SEP
09:43 PM
2615
Views
1
Ans
Function purity
o
manju_kambar
o
Sep 19th, 2014
Any function called from an sql query will have certain side effects on database state and package
variables..these side effects are classified as purity levels. there are different purity levels like 1. read
no database package state 2. write no database package state e.t.c
Answer Question
o
FEB
172011
10:11 AM
3640
Views
1
Ans
sk.mca6
o
Sep 12th, 2014
Calling procedure from other package should have following format
package_name.procedure_name;
if you are calling package in other schema, you need to create synonyms for that particular
Answer Question
o
JUL
102014
05:44 AM
5349
Views
2
Ans
Nareshbtd3
Raviteja
o
Aug 23rd, 2014
Instead of cursor is not there,, instead of trigger is used incase of complex views. when we use views
with joins
Kumar
o
Jul 25th, 2014
Its instead of trigger not cursor and it is used to apply trigger on views.
sachinkshd
Rakesh057
012014
JUL
01:48 PM
10399
Views
1
Ans
Rakesh057
122011
MAY
10:15 AM
4217
Views
1
Ans
Shashank Gangimalla
bhanu priya
o
1. function result cache : stores the retured value in a cache and can b used again n again
instead of storing it in memory.
2. continue statement : passes controle from one iteration to other rather than exiting it.
3.regexp.count is introduced.
4.dbms_parallel_execute is introduced.
Answer Question Select Best Answer
JUN
262014
02:23 PM
4782
Views
4
Ans
Rakesh057
Procedure also written the values using out parameter than why we need functions?
Rakesh057
Because procedure is pre compiler and function is not pre compiler so that the reason we
go for an calculation part in function
Madhav
o
Procedure also written in out parameter but we can not use procedure in Sql statement.
But if we wrote function and ita cant contain DML operation then we can access this
function in SQL queries.
Answer Question Select Best Answer
JUN
302014
12:27 PM
4307
Views
2
Ans
Rakesh057
When use Before and After Trigger? Please any help for this one
chaithanya
o
Before trigger is used while performing DML operations and whereas After Trigger is used
for after performing DML operations Real time Example for before trigger: in banking
systems: ...
Mrutyunjay Nayak
o
Before Trigger is used only when u want to restrict the invalid data entry in a table.After
trigger is used when u perform the operation in one table that will effect on other table.
Answer Question Select Best Answer
AUG
07:38 PM
092006
9665
Views
10
Ans
moviefan456
Ashish
o
Oracle
KSPRADEEP
o
Yes we can ..
Instead of cursor we using bulk collection or bulk binding or using %type and %rowtype
Answer Question Select Best Answer
OCT
062012
12:56 PM
9826
Views
4
Ans
sidd_130
In procedure function can be able to use ?if yes means give example
ram
o
Can any one tell how to retrieve more than one table structure at a time?
Answer Question Select Best Answer
APR
102012
02:27 PM
8033
Views
6
Ans
sudnic
What is the main purpose of RETURN in functions when we can calculate a value and pass it through
using OUT mode in procedure or functions?
Deepika S Verma
o
Its a myth that function returns value whereas procedure does not, actually procedure also
return value (i.e. 0 or 1 ) at the time of exiting which indicates the success or error. Whereas
Function ret...
shivigupta
APR
112013
01:41 PM
3893
Views
4
Ans
balanagi
Its a feature introduced in oracle9i where oracle DB allows user to view the content of table
quickly and easily the way it was at a particular time in the past, even when it is modified
and committed...
NAVEEN
o
APR
04:53 AM
192006
7335
Views
6
Ans
Dolly
Pixie
o
PL/SQL tables are PL/SQLs way of providing arrays. They are temporary tables in
memory and thus are processed very quickly. They are not database tables, and DML
statements cannot be issued against...
sbagai2001
SEP
092004
06:04 AM
16666
Views
10
Ans
o
o
Insert
Update
o.k.
o.k.
o.k. After...
A trigger may be a
1. DML Trigger on tables
2. Instead of triggers on views
3. System triggers on database or schema
Based on the way it executes statements triggers are of two types
1. Statement leve trigger
2. Row level trigger
A trigger fires for three actions
1. Insert
2. Delete
3.Update
and the trigger can the fired
1. Before action
2. After action.
tarini sankar das
o
Actual answer is we have 14 types of triggers in pl sql. For statement level :- 1-before insert
2-before update 3-before delete 4-after insert 5-after update 6-after delete For row level :- 7before ...
sandip.dhopat
DEC
162013
06:15 AM
6796
Views
2
Ans
Bind variabales
o
kamesh
The way to get Oracle to reuse the execution plans for "the statements having different hard
coded value in where clause" there should use bind variables. Bind variables are
substitution variable...
Aarti
o
Bind variable is session specific variable. It is declared using variable keyword . Bind variable
cant be used in named block. It cant have default value.
Answer Question Select Best Answer
SEP
092004
06:04 AM
7133
Views
10
Ans
NIL
prakashraj.v
AUG
162013
03:32 PM
6717
Views
2
Ans
plsqlgeek
How I can an Ac dynamo of a car/vehicle test with a12v dc battery good or bad
Pavan
o
OCT
062010
08:52 AM
13688
Views
4
Ans
COLLECTIONS
o
sdas84jobs
1-WHAT IS DIFF BETWEEN VARRAY AND TABLE?2-WHAT IS SQL SUPPORT FOR NESTED TABLE?
3-WHAT IS INLINE STORAGE AND OUT OF LINE STOGARE OF THE NESTED TABLE?4-WHAT ARE
COMMON EXCEPTION RELATED WITH COLLECTION?5-CAN U DECLARE VARRAY OF VARRAY OF
VARRAY OF TABLE?6-GIVE SAMPLE DEFINATION OF VARRAY OF OBJECT AND TABLE OF
OBJECT?7-WHAT ARE COMMON METHODS OF HANDLING EXCEPTIONS?
subhashishchaki
Collections similarities and differences Collection Type Elements Limit Subscript Type
Uninitialized Status Always Dense ----------------------------------------------------------...
basukolur014
AUG
162013
03:29 PM
4503
Views
1
Ans
plsqlgeek
How do you reference a (updated) table from procedure A which is being updated by another procedure
B?
Lalit
o
NOV
242011
04:20 AM
8964
Views
5
Ans
sai
Malar somu
Implicit Cursor:- It is Oracle implicit type.. when we fetch only one record then we need to
use implicit cursor i.e when ever we performing select query or any dml operations termed
as implicit curso...
hira
o
When ever any query execute by the server in database sever itself create a implicit
cursor ,which can not any control to the programmer but in case explicit cursor the
programmer has to create it.and used for the data manipulation by following some rule......
Answer Question Select Best Answer
DEC
192006
02:03 PM
3291
Views
6
Ans
sravan1
SQL>ed
Then Window Will Open,You Can Change Your Code.
Vinod Tuteja
o
Simply Write
SQL>ed
Then Window Will Open,You Can Change Your Code .
Answer Question Select Best Answer
AUG
142013
11:30 AM
10575
Views
2
Ans
Sukanta2013
Difference between PL/SQL table and Global Temporary Table. why we use Global Temporary Table
without using PL/SQL Table.
nivi
o
1.Global Temporary table is stored in Temporary tablespace while PL/SQL table is stored in
PGA. 2.SQL operations can not be performed on pl/sql tables whereas it can be performed
on GTT as any normal...
plsqlgeek
PL/SQL table or associated array is a collection (data type). Where as GTT is a temp table
created to store/process data for a particular session. Once you log out of the session the
data is gone, not the table structure.
Answer Question Select Best Answer
AUG
162013
03:26 PM
6225
Views
1
Ans
plsqlgeek
Procedure A calls procedure B. A updates table t1, t2. B updates table t3. If some error happens to B what
happens to the updates in all those tables? Whether they will rollback or commit? If commits how far it will
commit?
vishal.bhadange
CASE 1 (If you are not handling exception in Procedure B, none of the table gets updated)
"sql PROCEDURE A BEGIN UPDATE TABLE t1; UPDATE TABLE t2; CALL
PROCEDURE ...
Sort by:
Answers
|
Date
Jump to Page:
5
APR
282006
05:14 AM
26299
Views
18
Ans
Suyog
JILEY SINGH
Profile Answers by JILEY SINGH Questions by JILEY SINGH
o
Aug 4th, 2013
Function can be called in select statement but procedure cant be called in select statement. function
has return keyword but procedure not
Varun Tiwari
o
Jul 4th, 2013
Function Procedure 1. Can be used as column Cant used in select statement in select statement 2. Can
be used in where Cant used in where condition c...
Answer Question
202013
MAY
01:41 PM
3136
Views
1
Ans
sashelp
o
Jul 23rd, 2013
Ask the question clearly
what is DEPT_PERCENTAGE
on what basis we have to calculate DEPT_PERCENTAGE?
Answer Question
JUN
142013
03:13 AM
4440
Views
1
Ans
tinku981
If there are 2 overloaded procedure, one among then have 1 IN parameter and another have 2
parameters. Both procedures parameters are of default type.
What will happen when you will call package.procedure without any parameter?
Khamar
o
Jul 22nd, 2013
You will get an error message "PLS-0037: too many declarations of procedure_name match this call"
Answer Question
MAR
022013
02:56 PM
2549
Views
1
Ans
Group By
o
mikeslazak
Create a query using group by that shows maximum salary for each department?
lviswanath
o
Code
SELECT
FROM
GROUP BY
emp
deptno;
Answer Question
2. JUN
112013
02:15 AM
5374
Views
3
Ans
Nitin kumar
Varun Tiwari
o
Jul 4th, 2013
Any data transaction control statement can not be used in triggers. As trigger invokes due to any
DML event and the transaction may not be successfully commit later and may need to complete
rollback.
Pragma_autonomous can be used as an alternate way to commit.
prashant mhatre
o
Jun 13th, 2013
Can not used ...if we want to use it inside the trigger then use pragma_autonomous.
Answer Question
o
JUN
02:14 AM
112013
5464
Views
2
Ans
Nitin kumar
Code
o
before
FOR
INSERT ON
emp_trig
emp
each row
declare
o
o
i pls_integer;
begin
emp_pro;
i := emp_func;
dbms_output.put_line(TRIGGER called
o
o
end;
o
tinku981
AND FUNCTION
returned
||
i);
o
Jun 16th, 2013
Yes, by using CALL statement.
Answer Question
o
AUG
072006
12:49 AM
4284
Views
11
Ans
Gupta
Vinod Tuteja
o
Jun 14th, 2013
Main Difference : Referential
Index is created in both Cases (Unique and Primary key Constraint )
But can't references Columns with combination of UNIQUE and NOT NULL. Like in Primary
key ,we Can references primary key to make foreign key constraint .
z_ashwini
o
Jan 13th, 2012
Eg: Consider table emp with EMP_ID,EM|NAME,ADD columns You can define the column e_name
as Unique constraint. DECLARE e_name number(10) NOT NULL; BEGIN ... .. END: Primary key
cannot have NU...
Answer Question
o
OCT
062012
12:57 PM
6351
Views
5
Ans
Oracle Joins
o
sidd_130
There are 2 tables, A and B having 3 rows each. What will be result on executing the following
query? : SQL> select * from A,B
Raju TT
o
Jun 11th, 2013
Cross join -cartesian product :Table a no. of rows (3) * Table b no.of rows (3)= cross join query
returns 9 rows
Code
o
SELECT
* FROM
CROSS JOIN
b ;
Arpit Agrawal
o
May 24th, 2013
Here simply answer would be 6. Since a is having 2 rows and b is having 3 rows. And we go for
Cartesian join, which means 3*2=6.
Answer Question
o
JUN
222006
05:03 AM
2402
Views
1
Ans
Nitina
rajkumar1237
o
Apr 27th, 2013
OCI means::oracle call interface.is a interface api used to access oracle database from C programs.
Data Guard stands for it is multiple DB servers environment configured for Physical as well as
Logic...
Answer Question
o
OCT
062012
12:53 PM
3254
Views
1
Ans
sidd_130
o
Apr 12th, 2013
You can copy the data from one table to another with the help of below Query:
Suppose dummy is the main table and we need to copy the data from dummy_120413 table.
Answer Question
o
JUN
012006
03:41 PM
10491
Views
16
Ans
Ramakrishnan
rayavarapu
o
Jan 23rd, 2013
Null is not a value and not a string. It is unknown it is maximum in descending order and minimum
value in ascending order.
Sandeep
o
Char(0)
Answer Question
o
JUN
092006
03:45 AM
4071
Views
12
Ans
rojalina begum
Hasan
o
Dec 15th, 2012
Truncate is a ddl...delete is dml
cannot rollback data in truncate...rollback data in delete
truncate -delete entire data not structure...it delete specific datas
VASU
o
Oct 20th, 2012
By using delete we have to delete particular records only..
If we use truncate we cannot retrieve the data permanently...
Answer Question
o
OCT
062012
12:52 PM
5719
Views
2
Ans
Autonomous transactions
o
sidd_130
Sonal
o
Nov 7th, 2012
The AUTONOMOUS_TRANSACTION pragma changes the way a subprogram works within a
transaction. A subprogram marked with this pragma can do SQL operations and commit or roll back
those operations, without ...
VASU
o
Oct 20th, 2012
BY USING AUTONOMOUS TRANSACTION
WE GET THE FOLLOWING ADVANTAGES
WE PROCEDURE HAVING TRANSACTIONS STATEMENTS WE CALL PROCEDURE
AUTOMATICALLY EFFECT THE ABOVE TRANSACTIONS ALSO TO OVERCOME THAT
PROBLEM WE HAVE TO USE AUTONOMOUS TRANSACTION..
Answer Question
o
OCT
062012
12:54 PM
8382
Views
1
Ans
Oracle collections
o
sidd_130
What are the types of collection in PL/SQL? What is the advantage of nested tables?
pawan
o
Nov 6th, 2012
Varrays,nested tables,index by tables are oracle collection.Index by tables also known as associative
array similar to hashtables in java. Varrays are like arrays in java static in nature need to d...
Answer Question
MAR
192007
01:48 AM
23330
Views
12
Ans
ily_saravanan
Hi, What is nocopy parameter in oracle procedure. what is the use of it. In which situation,we
can use the nocopy parameter.Thanks,Saravanan.P
Himansu
o
Nov 6th, 2012
In procedure,Function there are three types of parameter is there. eg-IN, OUT, INOUT. IN parameter
is call by reference and OUT & INOUT are call by value. Always call by reference is faster than
call ...
Saket
o
Apr 3rd, 2012
Pass by reference: "IN" Case
Pass by value : "Out" or "IN OUT" Case which have the overhead of copying the value to new
procedure parameter.
In order to make to Pass by reference we will use NOCOPY
Pass by reference: "OUT NOCOPY" or "IN OUT NOCOPY" which deals which the actual reference
value.
Answer Question
o
JUL
03:36 AM
252006
7513
Views
10
Ans
senthil
chiatanya
o
Nov 5th, 2012
Implicit cursors are automatically generated,when a sql statement is processed where as
Explicit cursors are user defined.
VASU
o
Oct 20th, 2012
Implicit cursors returns only single record..where as explicit cursor multiple records. But it process
record by record.
Answer Question
o
OCT
062012
12:55 PM
3233
Views
1
Ans
sidd_130
o
Oct 31st, 2012
When you drop a type body, the object type specification still exists, and you can re-create the type
body. Prior to re-creating the body, you can still use the object type, although you cannot call the
member functions.
Answer Question
o
OCT
062012
12:58 PM
4391
Views
1
Ans
Oracle locks
o
sidd_130
o
Oct 22nd, 2012
V$lock contains details of locks
Answer Question
092004
SEP
06:04 AM
5045
Views
7
Ans
Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor, fetches rows of
values from active set into fields in the record and closeswhen all the records have been
processed.
eg. FOR emp_rec IN C1 LOOP
salary_total := salary_total +emp_rec
sal;
...
vasu
o
Oct 20th, 2012
Cursor for loop is the one by using this we need not to perform open, close, fetch operations of a
cursor..
PRADEEP
o
Oct 17th, 2012
If we use explicit cursor we need to open the cursor and fetching the data and close the cursor.
If we use cursor for loop cursor will open the cursor and fetching data and close the cursor
automatically.
Answer Question
o
NOV
092011
12:24 PM
5871
Views
3
Ans
Dany Wells
o
Oct 17th, 2012
We can use SQL Loader too
Jose George
o
Oct 16th, 2012
Depending on the situation one can use
external tables
or
UTL_FILE package
Database trigger is stored PL/SQL program unit associated with a specific database table. Usages
are Audit data modifications, Log events transparently, Enforce complex business rules Derive
column values automatically, Implement complex ...
KSPRADEEP
o
Trigger is data base object .Trigger is block of code it is executed automatically when dml
operations are fired .
by using trigger we can do the auditing and perform a operation(modifications) on a tables
(using dml operation)
krishnaindia2007
A database trigger is a named pl/sql block associated with a table and fires automatically
when an event occurs or something happens. Data auditing , Implementing complex
business rules, security are main uses of database triggers.
Answer Question Select Best Answer
SEP
092004
06:04 AM
2566
Views
6
Ans
IN,OUT,IN-OUT parameters.
KSPRADEEP
o
Two modes of parameters are available to pass the parameter In and Out, the default
parameter is IN. In : Lets you pass a value to subprogram being called.It can not be
changed inside the parameter(...
g_sidhu
IN (default): Passes a constant value from the calling environment into the
procedureOUT :Passes a value from the procedure to the calling environmentIN
OUT :Pa...
Answer Question Select Best Answer
192006
MAY
02:39 AM
3207
Views
4
Ans
shraddha
KSPRDEEP
o
1.There is no hard and fast rule about this. Whether to use INOUT or OUT depends upon
the situation.2. If not assigned anything to OUT parameter it retuns NULL value.
Answer Question Select Best Answer
APR
042007
03:09 AM
5340
Views
2
Ans
What is a cluster and what is the real time use and business
reasons to use Clustering
o
subbaraovangalli
KSPRADEEP
o
Cluster are groups of one or more tables physically stores together to share common
columns and are often used together
g_sidhu
Clustering is a method of storing tables that are intimately related and often joined together
into the same area on disk. For example, instead of the BOOKSHELF table being in one
section of the disk ...
Answer Question Select Best Answer
JUN
162008
08:57 AM
4868
Views
6
Ans
What is the need of primary key as opposed to using not null and
unique ?
o
sreeraghava.nara
We can create a column with' not null+unique' with out using primary key
PRADEEP
o
Primary key: set of columns is uniquely identified a rows of a table. It does not allow both
nulls and duplicate values. If we use null values it will allow duplicate values but it does not
allow n...
Radha
o
We can create NOTNULL and UNIQUE constraints on single column. Which indirectly
means a Primary Key. But only a Primary Key column can be used as Foreign key column.
Primary key provides a default...
Answer Question Select Best Answer
SEP
092004
06:04 AM
19207
Views
13
Ans
% TYPE provides the data type of a variable or a database column to that variable. % ROWTYPE
provides the record type that represents a entire row of a table or view or columns selected in the
cursor. The advantages are : I. Need not know about variable's data typeii. If the database definition of
a column in a table changes, the...
PRADEEP
o
%rowtype is associated entire table(if we want to declare all columns then we need to
declare %rowtype).
%type is associated with one column .(if we want to declare entire column then we need to
declare %type).
Yaseen
o
If using %type and %rowtype , no need to know the the data type of the table column . and
once the development is finished , the type of column is changed it will not effect the coding.
Answer Question Select Best Answer
SEP
022005
06:44 AM
11180
Views
14
Ans
PRADEEP
o
Ref cursor is having return type where as cursor does not have .
syntax of ref cursor:- type ref_type_name is ref cursor [return return_type].
syntax of cursor:- declare
cursor cursor name select statement..
pradeep
o
Code
o
CREATE
package pkg_test
cursor c1
end pkg_test;
RETURN
IS
emp%rowtype;
o
o
CREATE
cursor c1
begin
FOR
..
end pkg_test;
emp_cv
RETURN
IN
emp%rowtype
IS
IS SELECT * FROM
emp
WHERE
empno
= 10;
c1 loop
o
Answer Question Select Best Answer
282006
2. JUL
03:08 AM
6497
Views
12
Ans
suribabu
PRADEEP
o
oracle
rownum is also octal decimal number but it is for only specific time span it will arise after
completed a task.
Dilip
o
OCT
062012
12:52 PM
3527
Views
1
Ans
sidd_130
Global temporary tables are the permanently created tables for a timed session.
Only the data in the table is temporary but the table is permanent in the Oracle database.
Answer Question Select Best Answer
OCT
062012
12:58 PM
2694
Views
1
Ans
sidd_130
Check the table dba_dependencies and see what other tables are affected.
Answer Question Select Best Answer
312008
JUL
05:17 PM
3075
Views
3
Ans
galactus911
shivigupta
Code
o
declare
type id_table
IS TABLE
of testemp.emp_id%type;
v_id_table id_table;
o
o
begin
UPDATE
testemp
SET
subject
d1
WHERE
INTO
emp_id
= 1
v_id_table;
o
o
commit;
dbms_output.put_line(count
end;
IS:==||v_id_table.count);
GeekQA123
SEP
092004
06:04 AM
11081
Views
4
Ans
What is Raise_application_error ?
o
o
Their classes of errors and diff. errors are divided among these classes simply because of
ease in classification, For defining errors and error message with raise_application_error
procedure by users...
SARANYA
o
I know that the error no in raise_application_error are non standard but tell me on what
basis we are giving those numbers? is that simply a number or it some implicit meaning ?
Answer Question Select Best Answer
MAR
122012
03:26 AM
5730
Views
1
Ans
gaurvitul
hi
I have to write a query to fetch 5 columns from the data. columns are title,description,msgs_count,alerts
and severity.
msgs_count is count(title) over (partition by ) and alerts is sum(title partition by) over.
in case the duplicates of title are present in data. I want the title to come only once in the output but the
msgs_count and alerts must not be affected. is it...
raghavender
o
Analytic functions are used to fetch all rows with the required aggregate data, if duplicates
are needed, then you can use distinct or you can use group by clause instead of analytic
functions which will have better performance.
Answer Question Select Best Answer
MAR
202007
06:24 AM
7060
Views
9
Ans
nitin_kumat
if i am updating one record in a table at that time no other user can't able insert ,update the record in
same table How is it possible
Smruti R Das
o
There are couple of ways 1) If there are user other than owner accessing this table then you
can "grant select on TABLE_NAME" 2) Otherwise you DBA can create a role which will
have only the privillege...
Answer Question Select Best Answer
NOV
242011
11:21 PM
12847
Views
19
Ans
vinay.juri
HI all
table contain some 1000 records, today I inserted 100 records into table, so I want first 10 records data
from 100 records
how can I retrieve
kapil joshi
o
Code
o SELECT * FROM (SELECT * FROM emp
Answer Question Select Best Answer
252010
MAY
2.
05:23 PM
2748
Views
rownum
<11
1
Ans
sandip01
How to query nested table column of a table without using table function?
Pooja
o
There are two general ways to query a table that contains a collection type as a column or
attribute. Nest the collections in the result rows that contain them. Distribute or unnest
collections so t...
Answer Question Select Best Answer
FEB
092006
07:22 AM
5120
Views
6
Ans
Soma Bose
Vishal R Bhadange
o
Yes.
Yes we can truncate some of the rows from the table, But table should be partitioned & all
the rows to be deleted should be present in one single partition...
leelakrishna302
We cannot
Answer Question Select Best Answer
OCT
232011
01:06 AM
1894
Views
1
Ans
SAUMYA SRIVASTAVA
How to display all rows and all the columns of employee table?
ram
o
OCT
132006
11:21 AM
4147
Views
22
Ans
> Select Count(*) from T1 where a=10 3> Select count(*) from T1
where b=20 11Now, What will b the O/P of the following..select
count(*) from T1 where a=10 or b=20..............................
o
shamim909
ChevyBlazer
The answer will be between 11-14 . You have to consider two extreme cases where 1. 3
rows with a=10 and 11 rows with b=20 are all distinct rows - then the answer will be 14 2.
Where there are 11 rows...
Venkat
o
The accurate answer is "The result can contain max of 14 records", but this not guaranteed.
It can be less also. (Minimum is 10 rows and maximum is 14 rows). It is because there can
be some overlpa in the same row between "a" and "b" column.
Answer Question Select Best Answer
SEP
092004
06:04 AM
9840
Views
18
Ans
o
o
Cursor C1 is
Select empno,
Begin
open C1;
...
Vivek
o
After committing first oracle will commit the transaction into redo log file and then Data file.
The data block will remain into the memory until the logical reads are going on. Oracle use
LRU algorit...
Art11
The data will be written from redo log buffer into redo log files.
Aniruddha Das
o
If you want to take care of performance tuning you need to take care of sub-queries as they
takes a lot of time to executing in side the pl-sql blocks.
ptmich
Ref cursor is used to declare a pointer variable. When you return a ref cursor, you are
returning a pointer variable.
Answer Question Select Best Answer
AUG
02:45 AM
312006
7522
Views
20
Ans
sandeep
manisha
o
Use
Code
o
NVL(a.sal,0)<= NVL(b.sal,0)
Neeraj Siddhey
o
1.
2.
SELECT DISTINCT
WHERE 9=(SELECT
132012
MAY
05:21 PM
5726
Views
1
Ans
WHERE
a.salary<=b.salary);
Gunjan David
vizzi
o
When we use a select query in the from clause, it is called as a inline view. It is used to
reduce complexity of using so many join conditions.
Answer Question Select Best Answer
272008
JUL
12:55 PM
7507
Views
2
Ans
Oracle PRAGMA'S
o
Nishant.Patel
PRAGMA The instruction is a statement that provides some instructions to the compiler.
Pragmas are defined in the declarative section in PL/SQL. The following pragmas are
available: AUTONOMOUS_TRA...
bobbyiiit
OCT
232007
06:59 AM
12860
Views
7
Ans
Vikramsingh
pankti
o
A Table is a basic unit of storage in oracle .A nested table is a collection type. The main
advantage of collections is instead of processing data sequentially, we may process all
the date&nb...
Answer Question Select Best Answer
FEB
06:37 AM
132012
4881
Views
3
Ans
nabiel_pathan
In the exception part,what will happen if u dont give (when others) where will it show error compile time or
run time
NAND
o
It will give the error at run time if it is not able to find the type of exception thrown in the
current PL/SQL block or the outer block.
It will not throw the compile time error.
Mark Haynes
Now, to clarify, I am taking the following statement; "in the exception part, what will happen
if you don't give the (when others) statement" to mean an exception block with no other
when statements a...
Answer Question Select Best Answer
NOV
232011
12:58 AM
6971
Views
2
Ans
ram
SELECT
FROM
all_objects
Hitendra Yadav
o
Just use min() function and find minimum timestamp from a table.
Answer Question Select Best Answer
SEP
212010
08:21 AM
3354
Views
1
Ans
Index Work
o
sarikagopan
Indexes are created for better performance of the DB ; for faster retrival of data from DB.
There are diffierent types of indexes... (1) B tree index (2) Bitmap map index (3) Function
based index (4) ...
AUG
202006
10:20 AM
3757
Views
3
Ans
How can i import .dmp file in lower version of oracle from higher
version ?
o
santanu koner
ABHISHEK TYAGI
o
MAR
282007
01:22 AM
2554
Views
4
Ans
suresh
Shiyamala Devi
o
Code
o
SELECT *
FROM (SELECT
player_nm, gross_sal,
RANK ()
FROM
OVER
(ORDER BY
gross_sal
DESC)
playerRank
player)
o
WHERE playerRank = 4;
This query will display 4th highest salary from the player table
sunshine60india
AUG
252006
10:42 PM
3760
Views
7
Ans
How can i get set identity for last coloumn of the table.
o
Code
o
SELECT * FROM
(SELECT
AND
user_tab_columns
max(column_id)
FROM
WHERE
column_id
user_tab_columns
IN
WHERE
table_name=v_table_name)
table_name=v_table_name
SELECT * FROM
AND
USER_TAB_COLUMNS
column_id = (SELECT
TABLE_NAME='EMP')
WHERE
TABLE_NAME='EMP'
MAX(column_id) FROM
o ORDER BY COLUMN_ID
Answer Question Select Best Answer
OCT
2.
202010
07:52 AM
5381
Views
2
Ans
USER_TAB_COLUMNS
WHERE
gt.sanwaliyaji
UTL_MAIL: type procedure in UTL_MAIL 1)SEND (send the message without attachment)
"plsql Begin UTL_MAIL.SEND(sender
=>'karimuth@amazon.com',recipients=>'karimuthu.bala@gmail.com'...
zahar
Using utl_mail
Answer Question Select Best Answer
112010
JUL
09:48 AM
5182
Views
2
Ans
Rectify Deadlock
o
srividhya_85
If a deadlock has occured and if you have given with the dump, how will you identify that where the
deadlock has occured, how the deadlock occured and how to rectify the same.
kari
o
the steps necessary to identify and rectify code causing deadlocks are: * Locate the error
messages in the alert log. * Locate the relevant trace file(s). * Identify the SQL statements
i...
skumar.t15
Each user session might have one or more tasks running on its behalf where each task
might acquire or wait to acquire a variety of resources. The following types of resources can
cause blocking that c...
Answer Question Select Best Answer
MAR
202007
06:19 AM
24701
Views
9
Ans
Force View
o
nitin_kumat
What is Force View. Why Oracle Give Facility to create force view? What is the use of force View
sonam kanungo
o
As per my knowledge when view is created without base table.then the view is called as
forced view.
in this type of view is created with compilation error.
mohan
o
If we create a view without having base table, that view called as forced view. it will create
with compile error. it will be in invalid till base table create.
Answer Question Select Best Answer
DEC
202006
06:11 AM
6727
Views
11
Ans
Mrigen
Dharma
o
Code
o
SELECT
mohan
o
JAN
072008
10:50 AM
3343
Views
4
Ans
Debug Procedure
o
av_t66
You can debug the procedure. Oracle gives a util programme DBMS_DEBUG by which you
can debug a procedure.the full detail you can see at
http://www.oracleutilities.com/wiki/index.php?title=Dbms_debugan...
Answer Question Select Best Answer
FEB
232007
05:22 AM
15285
Views
10
Ans
How to insert data from one table to another table without insert
command and cursors
o
mandlakarna
Neeraj yadav
o
Code
SELECT
INTO
SELECT
tablename_2
WHERE
INTO
FROM
tablename_1
VNO='CV/2011/12'
gsmanvi
JUN
092008
06:09 AM
4497
Views
3
Ans
rudhra97
Art11
A hint is an instruction to the optimizer. You can use optimizer hints with SQL statements to
alter execution plans.
muraligrandhi
The optimizer hints determines the most efficient way to execute a SQL statement after
considering many factors related to the objects referenced and the conditions specified ...
Answer Question Select Best Answer
APR
192007
06:00 AM
9144
Views
4
Ans
Explain about CURSOR and REF CURSUR with real time scenario
where this can be used.
o
Art11
A REF Cursor is a datatype that holds a cursor value in the same way that a VARCHAR2
variable will hold a string value. It is not a cursor, but a variable that points to a cursor. It is
not limited t...
sunil
o
CURSOR A cursor is a variable that runs through the tuples of some relation. This relation
can be a stored table, or it can be the answer to some query. A cursor can be used in
realtime when u nee...
Answer Question Select Best Answer
SEP
012011
10:24 AM
5988
Views
7
Ans
Gopal Sanodiya
Code
o
NOT IN (SELECT
max(rowid)
BY
OR
SQL>
DELETE
<(SELECT
WHERE
rowid
Art11
Assuming that ename and job is the same or First and Last name...
SELECT * FROM (SELECT empno, ename, job ,RANK() OVER (PARTITION BY ename,
job ORDER BY empno) AS SeqNo FROM emp1) WHERE SeqNo > 1
narayani
g_sidhu
Before a PL/SQL program can be executed, it must be compiled. The PL/SQL compiler
resolves references to Oracle objects by looking up their definitions in the data dictionary.
Then, the compiler assigns storage addresses to program variables that will hold Oracle
data so that Oracle can look up the addresses at run time. This process is called binding.
How a database language implements binding affects runtime efficiency and flexibility.
Binding at compile time, called static or earlybinding, increases efficiency because the
definitions of database objects are looked up then, not at run time. On the other hand,
binding at run time, called dynamic or late binding, increases flexibility because the
definitions of database objects can remain unknown until then.
Art11
It uses deferred binding...in the sense it uses both static and dynamic binding.
Improve Answer
JUN
062011
12:14 AM
5616
Views
6
Ans
sandip.dhopat
How to identify missing records in a single-column table ?Column consists of numbers in a ordered
manner but the some numbers are deleted from the table in random manner and need to identify those
rows.p.s. This table consist of only 1 row.
Satya
o
"sql SELECT CASE WHEN ConNum - prev_id = 2 THEN TO_CHAR( prev_id +1) ELSE '[' ||
NVL( prev_id +1 ,1 ) || ' , ' || (ConNum-1) || ']' END AS missing_range , ConNum - NVL...
geetha
o
Code
o
MINUS
SELECT
FROM
dual
test
o
where the test table is like colA 2 4 6 7 the result will be the missing numbers..
Answer Question Select Best Answer
042011
2. MAY
01:11 PM
5235
Views
4
Ans
kperumal75
satya
o
Wrap command
Answer Question Select Best Answer
OCT
122007
02:27 AM
4467
Views
4
Ans
piyush sachan
VITHAL
o
APR
112011
07:35 AM
5878
Views
11
Ans
bab.mishra
Suppose Input table is COL1 COL2 COL 3A 1 -3B -2 6c 3 -4D 9 10In sql query I want the desired output
as follows COL1 COL nA 1B 6C 3D 10Please write the query to get this output
fire_starter
Hello, For my query example I have used the table test_tbl, and the columns col, col1, col2.
It also does consider NULL value in comparison, so it will show value on comparing with
NULL, and for ev...
BhushanNag
SEP
112011
02:56 PM
4584
Views
1
Ans
sreenuharshitha
pavankumar_greek
JAN
302007
01:47 AM
5213
Views
13
Ans
joseph
MURTHY
o
the question is very nice. yes we can have 2 triggers with same body but with different
names. ex: create trigger trg1 .................... ............................... end; create tri...
Baji Shaik
yes, we cant said upto 10g oracle server executes the triggers randomly,but 11g we are
having a feature follows clause,by using this we have to control the execution of triggers
explicitly by the deve...
Answer Question Select Best Answer
MAR
102006
11:57 PM
10171
Views
9
Ans
sandip_kate
Sahaja Mallarapu
o
A Ref Cursor is a variable that points to cursor.A ref cursor allows you to store the result of a
"bulk collect" from a table (or any PL/SQL cursor return set) into a PL/SQL table and then
reference ...
Sadashiv
o
REF Cursor OR Dynamic Cursors: Query associated with cursor is not known at the time of
compilation. The select statement associated with cursor is changing at the time of running
the program Syntax...
Answer Question Select Best Answer
OCT
202006
05:33 PM
2251
Views
9
Ans
dev
SURESHMALLIPEDDI
DEC
062008
12:38 AM
5068
Views
3
Ans
Composite Variables
o
kantri
A composite variable has internal components, which you can access individually. You can
pass entire composite variables to subprograms as parameters. PL/SQL has two kinds of
composite variables, coll...
agitatedsoul10
JUN
062008
03:35 AM
4102
Views
3
Ans
PL SQL Logs
o
liaohanming
We can't return more than 1 value in function but by using OUT parameter we can get
multiple values in function
which is not good programming, by using ref cursor we just save memory location of
function doesn't return more than 1 value.
sububhaai
1. Create a log table and insert your logging messages into this table.2. Write to a log file,
using the DBMS_FILE package, but this is not recomended because there is lot of I/O.
Answer Question Select Best Answer
JUN
022007
04:03 AM
7063
Views
10
Ans
Sachin Gadakri
saeed
o
We should use Exists or In based on the no of records inner and outer query is expected to
return.Using Exists : Here the outer query is executed first and then inner query is
excecuted for each value...
Answer Question Select Best Answer
OCT
112006
11:57 AM
3069
Views
6
Ans
Srinivas
manoj_lanser
%type is used when we have to define the datatype of a variable similar to another existing
column data-type. eg- v_id employess.employee_id%type. In this example we have make a
variable v_id similar...
Radha
o
We use %type and %rowtype in PL/SQL programming part. %Type: The variable will assign
the datatype which contains in the column of that particular table we mentioned. Ex: v_eno
employee.eno%type; ...
Answer Question Select Best Answer
FEB
072011
04:56 AM
2167
Views
3
Ans
Subashpanda
SELECT
name
FROM
v$database;
Saravanan Govindan
o
OCT
082006
08:28 AM
3697
Views
4
Ans
harinath
o
Cursor is a static,
ref cursor is dynamic,
we can't use ref cursor directly, so we declare cursor variable
cursor variables can't be stored in the database
Rajeshwaran
o
FEB
102006
11:37 AM
4314
Views
5
Ans
Shweta_faqs
Radha
o
We use view to be confidential about the data and to avoid the complexity of a query. But
Mviews are used for performance problem, we use mviews for faster execution of a query.
But we need to do regular refresh for mviews.
pawan_kr2007
View: If a query is being used again and again then its better to create a view with that
query. The query gets stored in database as an object.Materialized view: When you want
you replicate the main ...
Answer Question Select Best Answer
MAR
052006
06:38 AM
2849
Views
8
Ans
ravi chand
Radha
o
Triggers fire when any condition on such trigger is satisfied...but we don't know when that
trigger is going to be fired and if it is fired where can we see output of
DBMS_output.put_line.
If you 'set serveroutput on' and execute the statement which fires the trigger the message
will display on prompt otherwise it will not.
Answer Question Select Best Answer
OCT
182006
08:15 AM
2697
Views
3
Ans
basavarajkolur
Radha
o
Questions Like: Difference between Delete and Truncate Difference between Sub query and
Correlated sub query Difference between Decode and Case Different Types of constraints
Difference between...
Reks
o
142008
JUL
09:15 AM
3938
Views
6
Ans
jagadeesh9
Radha
o
Flash Back query is used to get back the deleted rows & dropped tables from the database
even they are committed. To get back the dropped table: Flashback table to before drop; To
get back...
murthy 1053
Flash back query is used to retrive the data.For ex if a table is dropped and we want the
table again so at that time.syn:=FLASHBACK TABLE table_name TO BEFORE DROP.This
will work only if recycled bin is not purged.
Answer Question Select Best Answer
142008
JUL
12:19 PM
9833
Views
15
Ans
Can you add not null column to a table already containing data ?
o
be_viral
Radha
o
Yes we can add NOT NULL constraint for the column already containing data as: If the data
doesn't have null values then - Alter table modify constraint ; If the data contains null
values...
monoranjang
Yes possible, try the below query:ALTER TABLE test add c1 VARCHAR2(10) DEFAULT ('a')
not nullThanksMonoranjan
SEP
202005
10:52 AM
21048
Views
7
Ans
kishorebabu
raghu iyer
Dbms_Scheduler.create_job(
...
praveen.pinisetti
1)Using DBMS_JOB package,we can schedule the job.There are number of built-in
functions in that package to schedule a job.Ex:DBMS_JOB .SUBMITDBMS_JOB .RUN.2)
Using DBMS_SCHEDULERTHIS I SYNTAX FOR CREA...
Answer Question Select Best Answer
OCT
312007
12:47 AM
2637
Views
5
Ans
Sant_parkash
raghu iyer
Hi, Its Not possible..... all the sub programs declared in spec must be implemented in the
body. In this case these sub programs will be private for this package only.Raghu Iyer
Sant_parkash
APR
032007
05:28 AM
17278
Views
4
Ans
globalanil18
kool.bird9
RajivPrasad
Also as mentioned by our friend rowid is a unique hexadecimal format integer which takes
up the representation as below
File: Block: Row One can retrieve rowid by using t...
Answer Question Select Best Answer
JAN
052007
01:59 AM
4865
Views
9
Ans
koteshwar t
nade_rs
We can also make use of compound trigger (new feature in 11 g to avoid mutating error)
Baji Shaik
The row level trigger based on a table,the trigger body can't read thedata from same
table, if you are trying to this it gives mutating errorto avoid that you must use statement
level trigger
Answer Question Select Best Answer
282006
JUL
10:23 AM
6107
Views
8
Ans
suribabu
muraligrandhi
A forward declaration means that modules (procedures and functions) are declared in
advance of their actual body definition. For example, if program A calls program B and
program B calls program A,&nb...
KD09714
MAR
182006
03:08 PM
47222
Views
29
Ans
Babar Shabbir
sunshine60india
Both primary key and unique contain unique value.1: primary key cant be nullUnique key
can be null.2: Multiple column of table van be defined as unique key.Only one column can
defined as primary key
Answer Question Select Best Answer
JAN
302007
01:49 AM
3443
Views
7
Ans
joseph
Baji Shaik
The orders of triggers execution is like this 1.before statement level 2.before
row level 3. after row level 4 after statement level
samareshp
Order of triggre firing :::::::Before Statement levelBefore Row levelAfter Row levelAfter
Statement level
Answer Question Select Best Answer
FEB
072007
10:33 AM
4201
Views
3
Ans
kkanmani
Baji Shaik
FEB
162007
10:29 PM
9595
Views
4
Ans
ddkdhar
Baji Shaik
Strong ref cursor return value, but seek ref cursor it can't return any value
askvenki
A strong REF CURSOR type definition specifies a return type, but a weak definition
does not.DECLARE TYPE EmpCurTyp IS REF ...
Answer Question Select Best Answer
SEP
242006
02:07 AM
3279
Views
9
Ans
Oracle_learner
sandeshshinde000
begin DML 1 ' ' ' ' ' DML 10exceptionwhen others thandbms_output('error at location '||
dbms_utility.format_error_backtrace);e...
BakulPatel
To simplify Remove exception block. Oracle will show line number with error thrownOther
method:beginlocation :=1; dml1 location :=2; dml2exception when others than&nb...
Answer Question Select Best Answer
FEB
082006
02:47 AM
2943
Views
9
Ans
chiranjeevi reddy
NehaChanda
We can not use MAX on PLSQL table. Check if it works.Create a PLSQL Table
Sorted_Mark.SNO_MARK(3) := 0; - Replace ASorted in another Collection Typeselect
culumn_valuebulk collect into Sorted_MARKfrom table (cast(SNO_MARK as
PLSQL_DATATYPE))order by column_valueSorted_MARK(1) - First Value
samareshp
I guess the the question should be replace a with zero then sort the mark and
then show first mark, Let me know if i am wrong.
select max(mark)
from (
SELECT sno, mark
FROM (select sno, decode(mark, 'A', 0, mark) x from t) xt
ORDER BY x
)
Answer Question Select Best Answer
FEB
072011
04:41 AM
2431
Views
1
Ans
Subashpanda
SEP
192005
11:40 AM
4585
Views
7
Ans
">
Beena
krishnaindia2007
A warning or error condition is called an exception. An exception may raise in a pl/sql block
due to designing faults, coding mistakes or hardware failure. If an exception raises in a
block ...
g_sidhu
You can handle exception in two ways: Trap it with a handler : If the exception is raised in
the executable section of the block, processing branches to the corresponding exception
handler...
Answer Question Select Best Answer
SEP
272005
06:53 AM
1983
Views
11
Ans
sreelatha
krishnaindia2007
Procedures Can have Parameters. But parameters is optional .i.e. we may defined
procedures without parameters also.It can take three types of parametersIN , OUT and
INOUT.
kanchan Patra
o
SEP
092004
06:04 AM
23936
Views
3
Ans
The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. To get
an error message of a specific oracle error.
e.g. PRAGMA EXCEPTION_INIT (exception name, oracle
error number)
Devendra Tawar
PRAGMA EXCEPTION_INIT statement associate the declared exception with the standard
Oracle server error number. PRAGMA EXCEPTION_INIT tells the compiler to associate an
exception name with an Oracle er...
Answer Question Select Best Answer
JAN
07:03 AM
182011
3038
Views
1
Ans
vrushali
FEB
162007
10:33 PM
4243
Views
3
Ans
ddkdhar
Teju_hassan
g_sidhu
Rank Function can cause non-consecutive rankings if the tested values are the same.
Whereas, the dense_rank function will always result in consecutive rankings.
Answer Question Select Best Answer
MAR
052006
10:55 AM
2149
Views
3
Ans
kumar71979
debasisdas
I believe an example would be best way to explain this.The scenario is whan user passes
an employee_no to be inserted into EMP table i wan that value to be check against the
existing record. If the em...
Arun
o
MAR
082011
05:03 AM
2646
Views
1
Ans
gangadhar6708
mailtonagaraja
Hi , 1) In Package we can combile all related objects into one component, whenever you
refer or call any object in the package , full package will be copied to the memory , so that
next ti...
Answer Question Select Best Answer
FEB
172011
03:07 AM
1986
Views
0
Ans
Call FieldControls
jalaramaiah_k
Subashpanda
Suppose a programmer creates a user defined exception handler Invalid_Number in declare block with
type EXCEPTION and raise this exception in begin block. Then how will you access the user defined
exception and same system defined exception (i.e Inavlid_Number)
promisinganuj
The system defined exceptions in Oracle are tied to Oracle error codes. For this case,
system defined error INVALID_NUMBER is tied with error code -01722.Now, when a user
defines the sa...
Answer Question Select Best Answer
JUN
272008
01:59 AM
3444
Views
5
Ans
kondla
It's true. Procedures in the packages are faster than the stand alone procedures, because
all the procedures in the package are compiled once and stored in the SGA at shared pool
area. If we call the ...
Answer Question Select Best Answer
JAN
182011
07:07 AM
3112
Views
2
Ans
Unconstrained Loop
o
vrushali
Unconstrained loop means loop that can't be handled as per our will.Basic loop is a simple
example of unconstrained loop - if we ignore proper exit statement in basic loop then it
becomes an infin...
Answer Question Select Best Answer
OCT
062010
08:43 AM
3109
Views
3
Ans
DATATYPES
o
sdas84jobs
1... max length is 327672 rowid means row plus id actuall its psedocolmn that store the
value of each rowwith the help of rowid>>> we can remove duplicate value>>> we can
dispa...
muraligrandhi
SEP
092004
06:04 AM
2453
Views
4
Ans
a. Stored procedure or anonymous block b. an application program such a PRC *C, PRO*
COBOL c. SQL *PLUS
a. PACKAGE NAME.PROCEDURE NAME (parameters);
variable :=
PACKAGE NAME.FUNCTION NAME (arguments);
EXEC SQL EXECUTE ...
shi_fu
MAR
282010
07:34 PM
4355
Views
variable := PACKAGE
4
Ans
sue86
You are developing a PL/SQL block designed for bulk data operations. When attemping to store table
data for multiple rows in a PL/SQL variable, which one of the following choices identifies the mechanism
best suited for this task (choose one)? A. cursorB. varchar2C. recordD. table of records
rahulg5211
Table of record type is best option to perform this operation.becouse first thing pl/table has
unlimited size.second thing for fetching bunch of record into pl/table,besides of INTO
clause we ne...
shukla.prashant76
Answer is D. We need multiple rows on a variable so we use here Table of records .it uses
just like as collection of records.Cursor is used for selecting multiple rows from stored
table.Var...
Answer Question Select Best Answer
NOV
232006
09:37 AM
7048
Views
2
Ans
Ramachandra
kalpana2u95
Pre SQL query means that the integration service runs SQL commands against the source
database before it reads the data from source. Post SQL query means IS runs
SQL commands against target database after it writes to the target.
Pawan Ahuja
o
Pre-query trigger fires only ones while post-query trigger fires each time.the Post-Query
trigger fires each time Form Builder fetches a record into a block.RegardsPawan Ahuja
Answer Question Select Best Answer
SEP
122006
12:44 AM
4362
Views
4
Ans
suri
asraf_pa
You can use DBMS_SESSION to set & get session variable. Below is the example for the
sameSQL> EXEC DBMS_SESSION.SET_CONTEXT('CLIENTCONTEXT', 'myvar',
'myvalue');PL/SQL procedure successfully co...
rampratap409
session variable can not be declared in package, variable declared in package are called
global variables. create package mypack isnum number := 7;num2 number;end ;here num,
num2 are global vari...
Answer Question Select Best Answer
AUG
022009
07:31 PM
4985
Views
8
Ans
sanjeevlabh
What is the best technique of debugging large and fragmented dynamic SQL.
kumardba
You can try to debug Dynamic SQL using SQL Advisor Tool or TKPROF tool
shivaranjani.p
Hi,You need to store each and every line of the dynamic sql in a file using UTL_FILE
Package before you could execute it, so that you can refer the same file after executing the
code, this here serves...
Answer Question Select Best Answer
AUG
09:15 AM
092007
2734
Views
3
Ans
soorajsk_84
Art11
My example is not perfect but close."sql SELECT deptno, job, ename, sal
,CURSOR( SELECT ename, deptno, job, sal , DENSE_RANK () OVER (ORDER BY sal
desc) rnk ...
dipanjan80
Using LEAD analytical function its possible to get hierarchical set of data. Here is an
example: SELECT deptno, empno, sal, LEAD(sal, 1, 0) OVER (PARTITION BY dept
ORDER BY sal DESC NULLS LAST) N...
Answer Question Select Best Answer
OCT
132005
09:27 AM
1992
Views
9
Ans
How would you hide a table in sql. ie the table can be only visible
to its maker.
o
abhishek
We are misunderstanding the question and I assume that Abhishek want to say that "How
we can hide a table info from user?".To hide table info or as per question make it invisible to
other user. A tabl...
pravelu
It can be done using role grants. Grant view or debug privileges to only the set of users who
can see these tables. The other users who are not granted the privilege cannot view this
table. Every single user is a Schema in Oracle.It is by default, that the table cannot be seen
by others.
Answer Question Select Best Answer
APR
232006
04:19 AM
7421
Views
3
Ans
kameshakundy
asrafpa
The function purity level defines what structures the function reads or modifies. Following
are the purity levels 1) WNDS - Writes No Database State i.e. Function does not modify any
database tables ...
pari
o
MAR
062009
04:56 PM
3336
Views
8
Ans
Package Function
o
harit79
You have a package called A and one function in that packgae called XYZ.If you need to call that function
in second packaged B, How will you call?
Raj_P
Yes we can call a function which is there in a Package 'A' from Package 'B'. And it is very
simple as stated belowPackage_Name.Function_Name(Parameter_List);
Answer Question Select Best Answer
252010
MAY
11:17 PM
3015
Views
6
Ans
Status of Procedure
o
anulc
If a procedure is referring a table and if the structure of the table is changed, lets say data type of the any
column is changed, then is it possible that the status of the procedure remains valid? Explain
Read Best Answer
It is possible that a procedure remain valid even when the data type of columns of a table
on which it is operating change.
This can be achieved by using Anchor declaration i.e. %TYPE and %ROWTYPE while defining reference to
such table columns and rows respectively in the procedure.
tar.goyal
It is possible that a procedure remain valid even when the data type of columns of a table
on which it is operating change.This can be achieved by using Anchor declaration i.e.
%TYPE and %ROWTYPE while defining reference to such table columns and rows
respectively in the procedure.
anironic
If PL/SQL stored SP %type and does not explicity declare a datatype, then it is quite
possible that Stored procedure remains valid, even after changing the datatype in the table.
Ex, you have a declar...
Improve Answer
062006
MAY
08:43 AM
1420
Views
3
Ans
biswajit
Gaurav_Vashishtha
You can get the source code of the wrapped pakage from dba_source table.
ravikumarzee@gmail.com
Desc e.g., If u want to know the procedures and functions in a package called xyz thendesc
xyz;
Answer Question Select Best Answer
062010
JUL
12:30 PM
2775
Views
1
Ans
Raj_P
Package without body is used to declare global cursors and constants which can be used
by other function, procedures or packages
Answer Question Select Best Answer
072010
JUL
03:10 AM
3048
Views
1
Ans
PL/SQL Synonym
o
kanchanG
Dear Kanchan Maheshwari There are two categories of synonyms, public and private. A
public synonym can be accessed by any system user. The individual creating a public
synonym does not own the sy...
Answer Question Select Best Answer
AUG
262009
03:27 AM
2294
Views
2
Ans
sowjanya.valaparla
Rebuilding IndexSyntax: Alter index index_name rebuild.If you rebuild the index, the existing
index will be dropped and created immediately, and any overheads existing on the index wil
be removed. The...
Answer Question Select Best Answer
MAR
02:44 PM
012007
6090
Views
5
Ans
ddkdhar
neerajalatha
Disadvantages:It is slow when compared to native dynamic SQL and coding is also difficult
when compared to native dynamic SQL.
stshekhar
DEC
202006
06:15 AM
2204
Views
6
Ans
Mrigen
machomanic
You can use the command SQL> SET TIMING ON;This will show how much time your
query took for the execution.
neerajalatha
JUN
192010
09:46 AM
1409
Views
1
Ans
my_colorado
If you have to call same piece of code at many places in a package, How do you achieve this without
calling the function many times?
kanchanG
SEP
202005
10:50 AM
2589
Views
7
Ans
Kishorebabu
when others then *ERROR at line 6:ORA-06550: line 6, column 2:PLS-00370: OTHERS handler must be
last among the exception handlers of a blockORA-06550: line 0, column 0:PL/SQL: Compilation unit
analysis terminated
kiran_marla
Error occurs, why because "when others" must and should be placed at last in exception
block
neerajalatha
FEB
072006
02:14 AM
3426
Views
6
Ans
Srinu
neerajalatha
Performance tuning can be improved by using FOR ALL and BULK COLLECT clauses in
place of FOR LOOP and CURSORS which makes the application faster and better.
ORA_CRAZY
Using Bulk binding concepts, we can tune the PL/SQL job that takes long time due to
millions of records.
Answer Question Select Best Answer
SEP
092004
06:04 AM
5154
Views
6
Ans
Objects of type TABLE are called "PL/SQL tables", which are modeled as (but not the same as)
database tables, PL/SQL tables use a primary PL/SQL tables can have one column and a primary
key. Cursors
Read Best Answer
A PL/SQL table can have only one column. It is, in this way, similar to a onedimensional array.
Unbounded or Unconstrained
There is no predefined limit to the number of rows in a PL/SQL table. The PL/SQL
table grows dynamically as you add more rows to the table. The PL/SQL table is,
in this way, very different from an array.
Related to this definition, no rows for PL/SQL tables are allocated for this structure
when it is defined.
Sparse
In a PL/SQL table, a row exists in the table only when a value is assigned to that
row. Rows do not have to be defined sequentially. Instead you can assign a value
to any row in the table. So row 15 could have a value of `Fox' and row 15446 a
value of `Red', with no other rows defined in between.
Homogeneous elements
Because a PL/SQL table can have only a single column, all rows in a PL/SQL
table contain values of the same datatype. It is, therefore, homogeneous.
With PL/SQL Release 2.3, you can have PL/SQL tables of records. The resulting
table is still, however, homogeneous. Each row simply contains the same set of
columns.
Indexed by integers
A PL/SQL table is a database table having one column and rows are stored not in
predefined order. Associative arrays and nested tables comes under category of
PL/SQL.
babu.sridharan
SEP
292008
10:10 AM
5938
Views
6
Ans
varma.ukk
What is the difference between an explicit cursor and select into statement?
neerajalatha
Select statement can return multiples rows at a time and there exists only one network
round trip.Explicit cursors are memory areas which acts as a handle or pointer to context
area and allows to fetc...
rashlikesu
When select into query returns just one row, Oracle uses implicit cursor to execute and fetch
the results for the query.But if the select statement returns more than one row, an Explicit
cursor is created to fetch the data.
Answer Question Select Best Answer
NOV
252008
05:59 PM
3819
Views
5
Ans
harit79
1) Why we use pl/sql array rather than cursor?2) In which condition we use function overloading? 3) What
is pipe function?4) What is the mutating trigger? What should be the condition?
renu_db_dev
1) Why we use PL/SQL array rather than cursor?PL/SQL array is a collection through which
we can iterate just the way we can through cursor. But in case of Cursor the context
switching is for every row...
avis_sarkar
Triggers are PLSQL block or Procedures which get executed whenever:1) an INSERT,
DELETE or UPDATE happens on a table. 2) DDL like ALTER or CREATE happens on a
table. 3) an INSTEAD OF trigger on a view...
Answer Question Select Best Answer
FEB
242006
05:20 AM
1644
Views
2
Ans
skmishra_it
Showstopper
Begin for loopcounter in 1..10 loop dbms_output.put_line(loopcounter); end loop; end; / This
piece of code will display the loopcounter in a PL/SQL loop on the screen
mekshi_2kk
JUN
112008
01:03 PM
4894
Views
2
Ans
Paging In Oracle
vijay.patil2005
Hi All,I have requirement of sending the records based on the input received from web.I have a ref_cursor
returning 30 rows..Here I am supposed to do paging on the set of records present in the above ref
cursor.If web gives 1 , then I should send first 10 records in the ref cursor..If gives 2 , then I should send
next 10 records in the ref cursor..similarly..I will get some sort of indicator from...
muraligrandhi
With the help of Ref cursor you can get particular no of records(means 1=10 records,2=20
records like that), for that you can use rownum in the filter condition.If you add below query
in Ref cursor yo...
pvidhya
First you have to filter the no of records you need totally (i.e., if you receive input as 2 and if
the no of records you need to return are 20, then you need to filter 20 rows) using where
rownum
Answer Question Select Best Answer
JUN
262008
06:56 AM
4462
Views
4
Ans
ramyaselvi16
What is the purpose of Ref Cursor and OUT Parameter in PLSQL Function? Give Examples for each?
muraligrandhi
Main advantage of Ref cursor is you can get the output as record set. For example if you
are using Java or .Net or cristal reports for reporting purpose then you can use Ref cursors
and write a subpro...
pratap557
By Ref cursor we can send record set to the calling programLike .NET VB page can get
recordset as datatable from ref cursor returned by a procedure.OUT parameter sends only
one value from procedure
Answer Question Select Best Answer
JUN
122008
03:57 AM
2871
Views
3
Ans
sanjoy.dubey
How can the error line can be identified for a package at run time ?
muraligrandhi
MAR
222009
01:28 AM
4110
Views
4
Ans
DeCode Performance
o
test2008
The answer to this question would actually depend on the type of applicability of the usage
that is being done. i.e. is it required in a query or in a PLSQL block. If it is in a query we
cannot use if...
Answer Question Select Best Answer
FEB
12:02 AM
182009
3902
Views
2
Ans
Infinite Loop
o
sandeep_sb4
How will you stop an infinite loop without closing the program?
muraligrandhi
For terminating the INFINITE LOOP we can use EXIT statement.Example: LOOP
monthly_sales:=daily_sales*31; EXIT when monthly_sales > 3000; END LOOP;
joe0082
Use the EXIT statementThis will stop the looping and proceed to the next executable
statement.or EXIT WHEN condition
Answer Question Select Best Answer
DEC
202006
06:14 AM
2828
Views
2
Ans
Mrigen
chaitunitk
Owner of a table is the schema name which holds the table. To change the owner just
recreate the table in the new schema Using create table XXX AS select * from
oldschemaname.XXXand drop the previous table in oldschema
Das
o
Owner of a table is the schema name which holds the table. To change the owner just
recreate the table in the new schema and drop the previous table
Answer Question Select Best Answer
APR
152009
05:58 AM
3224
Views
4
Ans
kthy86
What are all the different ways available to find the null value in a table
NSingh
In pl/sql:"is null" and "is not null" are the best way to find null and not null values resp.In tsqlif ansi_nulls is off then(set ansi_nulls off)"=" will work to search the null values
OCT
022004
12:00 AM
1911
Views
2
Ans
ajeeteng
Autonomous transactions refer to the ability of PL/SQL temporarily suspend the current
transaction and begin another transaction. The second transaction is known as an
autonomous transaction, an...
uday
o
NOV
222005
05:35 AM
16256
Views
10
Ans
SumanNaidu.S
psingla
In 10g we can
Andrew
o
OCT
022004
12:00 AM
1387
Views
1
Ans
ajeeteng
APR
112007
02:41 AM
2040
Views
2
Ans
Ram Kumar
psingla
There are three types of alogrithm used by SQL compiler for joining purpose:1) Nested join
algo2) Hash join algo3) Merge join algoComplier choose any one of these algo based on
the best suited for per...
norman
In hash join hash table gets build using the inputs. Nested loops as the name implies uses
looping construct strategy for storing and retrieving. In terms of performance comparison
while retrieving da...
Answer Question Select Best Answer
NOV
122006
11:28 PM
1456
Views
5
Ans
Srinivas
psingla
In Oracle 9i and above this can be achived in single query (merge query)
ss
o
Insert the row you want you as if it doesn't exist, in the exception write the update
statementBegin//Inser the rowExceptionwhen< row already exists>//update the rowEnd
Answer Question Select Best Answer
012007
MAY
02:13 AM
2292
Views
2
Ans
hindol_saha
psingla
COUNT(Distinct) is better than using Self Join to find redundant data as it is faster and
shorter. Beside this COUNT(Distinct) provide more flexibility.
raafay
psingla
PL/SQL is procedural language.It is built upon sql with extra added functionalities.It is used
by ORACLE .robust and consistentexception handling is great the concept of package is
greatdisallow bad co...
Yaseen
o
APR
282010
01:22 AM
2917
Views
0
Ans
psingla
How a SOAP web service can be called from PL/SQL block?How can we handle the result set returned
by the SOAP service?
Answer Question
JAN
232007
05:26 PM
1205
Views
3
Ans
Lisa
psingla
2) Triggers cannot be called rather they are fired automatically based upon their
specification.
MuralidharanR
FEB
122008
06:55 AM
1108
Views
3
Ans
Pavithara
How to query the customer details from a Table who have purchased No. of items greater than 5?
psingla
SEP
052008
05:47 AM
1708
Views
1
Ans
ramesh.akula9
1. Create a ontrol file with extn (.ctrl). This file will map the flat file data with the Oracle table
columns.2. Pass control file as one of the parameter of SQL Loader.
Answer Question Select Best Answer
MAR
162009
06:38 AM
2055
Views
3
Ans
tnagarjun
You can Call SQL Script by using @ and then giving path of the source fileFor ex:
@c:/sqlscript.txt;RegardsDharmendra Jaiswal
prasadreddi
@<path>filename.sqlgive the path where the file is located extactly.Ex :- Let us say our file
is located at c:tempabc.sqlSQL> @"c:tempabc.sql" It is better practice to use double qu...
Answer Question Select Best Answer
SEP
262005
08:09 AM
1402
Views
11
Ans
George Suresh
kiran_marla
There is no difference between function and package, except function must and should
return a value while procedure do not. But it is not a good practice to use out mode in
functions.However a default...
vishadk
I believe you are asking about the use of 'out' in the function declaration.One can use 'Out'
mode in the functions in the manner simlar to procedure i.e.Create or Replace function
fun_out_example(par...
Answer Question Select Best Answer
SEP
052008
07:10 AM
1080
Views
2
Ans
Autonomous Transcation
o
ramesh.akula9
Autonomous transactions are independent of the main transactions.You can commit the
changes in the other tables using these transactions, even though the main transaction is
not a success. Depending on one transaction, you can commit/rollback the other
transactions.
namita04
A autonomous transaction starts with the first SQL statement of the PL/SQL block and ends
with a commit.
Answer Question Select Best Answer
OCT
252005
10:54 PM
2450
Views
11
Ans
Mohammad
No answer
samareshp
While creating a package, we can use Show error Command to get the line number thats
has error. And can be corrected. Even we can check in the data-dictonary view i.e.
user_errors to figure out the er...
gem023
On SQL Plus you can give the command - show errors. This would show the line number
and reason for the compilation error.
Answer Question Select Best Answer
AUG
062007
02:32 AM
5554
Views
4
Ans
What is the difference between right join and right outer join..
o
MuthuKrishnan
samareshp
Both are same.outer join : We have 3 types of outer joins. Left Oute, Right Outer and Full
Outer join.Left outer join:Select * from lefttable, righttable where
lefttable.col1=righttable.col1(+)This wi...
krishnaindia2007
Both are same. Right outer join returns all the reocrds that satisfy the join condtion + rest of
the records from right (or second) table.
Answer Question Select Best Answer
SEP
272006
07:03 AM
2013
Views
7
Ans
snehal
kvsubramanian
Try to Replace "AND A.ITEM like 'OA%'" with " AND substr(A.ITEM,1,2) = 'OA' ".
nagarajbng
If you are using the UNION keyword then there is no need of using the distinct keyword in
your query or else you can use UNION ALL keywordorBelow I am sending the modified
queryIn your query which col...
Answer Question Select Best Answer
DEC
242009
10:06 AM
2639
Views
2
Ans
Execute Immediately
abhi_only12000
EXECUTE IMMEDIATE is the replacement for DBMS_SQL package from Oracle 8i onwards.
It parses and immediately executes a dynamic SQL statement or a PL/SQL block created
on the fly. Dynamically created a...
Brajesh Singh Bhadoriya
Execute immediate is used to prepare dynamic SQL. There might be scenario where one
has to prepare the SQL statement at run time in a PL/SQL object. Execute immediate
requires one SQL statement which ...
Answer Question Select Best Answer
OCT
232009
07:29 AM
3394
Views
2
Ans
Types of Lock
o
beethakker
Oracle uses two modes of locking in a multi-user database:Exclusive lock mode (X)
prevents the associates resource from being shared. This lock mode is obtained to modify
data. The first transaction t...
rahulmca
The two basic types of locks are DML (table) locks, and DDL (dictionary) locks. DML locks
are designed to guarantee data integrity in a multi-user environment. DML locks prevent
conflicting DML and DD...
Answer Question Select Best Answer
AUG
172008
06:53 AM
4693
Views
5
Ans
bmsrao
The trigger is fired when an event occurs while manipulating the data in table.So the trigger
applies a lock on it restricting others to modify it.Locks are released when a TCL command
is executed. Th...
Vansat
We cannot use TCL statements in triggers, because using them violates the integrity of the
transaction. But if we want TCL statements to be used in triggers then that can be
implemented by using Auton...
Answer Question Select Best Answer
252006
MAY
05:20 AM
1753
Views
3
Ans
alex
harinicm
Use AUDIT is used to track the occurrence of the sql statements in the subsequent user
sessions (not the current session). The audited record contains:Name of the userType of
the operationObject...
nareshg_009
AUG
072008
10:50 AM
4732
Views
6
Ans
chinnuchaitu
One conventional and popular method of debugging a pl/sql code is through printing the
program execution path using a printable statement. For this you have to enable the output
mode using the command...
OraclePassport
OCT
152009
04:25 AM
1323
Views
1
Ans
knows
How to select multiple data from different tables which do not have related constraints?
bhagavatula
It is not necessary to have 'related constraints' between tables to retrieve data from multiple
tables. However, there should be a logic to associate data between the tables (related
data) based on which you can select information from multiple tables
Answer Question Select Best Answer
152007
MAY
01:41 AM
1593
Views
1
Ans
rishamjeet
godsrikanth
Difference is in performance. API is a package call which will process faster since its
already compiled. It can be called globally. Stored PL/SQL call is not compiled into
memory and may take more time.
Answer Question Select Best Answer
MAR
07:03 AM
292007
4602
Views
2
Ans
globalanil18
berly.george
Conceptually, INSTEAD OF triggers are very simple. You write code that the Oracle server
will execute when a program performs a DML operation on the view. Unlike a conventional
BEFORE or AFTER trigger...
Answer Question Select Best Answer
MAR
212006
04:15 AM
9773
Views
5
Ans
michelle
hmounir
In natural joins USING clause can be used to specify only those culomns that should be
used for an equijion
ravikumarzee@gmail.com
Sort by:
Answers
|
Date
Jump to Page:
13
APR
212008
03:27 AM
4327
Views
3
Ans
ravishing_sid
What is Global temporary table? and what are the benefits of it?
vanishavadlya
o
Oct 24th, 2009
The data in a global temporary table is private, such that data inserted by a session can only be
accessed by that session. The session-specific rows in a global temporary table can be preserved for
t...
taya_ronak
o
Nov 3rd, 2008
Global temporary table is kind of temporary table managed by system. it'll keep in temporary
tablespace till the session remain. there are two methods available i.e.1) create global temporary table
t1...
Answer Question
JUL
182006
10:03 AM
3635
Views
6
Ans
Natesh
jabir.mkk
The maximum parsed/compiled size of a PL/SQL block is 64K and the maximum code size is 100K.
You can run the following select statement to query the size of an existing package or procedure.
SQL> select * from dba_object_size where name = 'procedure_name'
malik.aman
o
Dec 1st, 2007
Select * from dba_object_size where name = 'procedure_name';
Answer Question
FEB
152006
12:34 PM
4574
Views
4
Ans
Shweta_faqs
pawan_kr2007
o
Oct 11th, 2009
ALL_OBJECTS: Objects accessible to the user.USER_OBJECTS: Describes all objects owned by
the current user.DBA_OBJECTS: Describes all objects in the database.
krishnaindia2007
o
May 7th, 2008
The information available in data dictionary tables is very difficult to understand. So it provides
views in a form that is easily understood by users. All these views are owned by sys. Oracle
provid...
Answer Question
OCT
292007
02:48 PM
2272
Views
2
Ans
Ramesh Venkatesan
Assume that I am using a temporary table in a procedure and I am inserting records and updating
another set of records through Merge statement. If I use cursor in that temporary table, How can I
extract all of the records from temporary table at the end of the stored procedure. Can you please
give coding for this.
johnjerry
o
Oct 7th, 2009
Make sure you do not COMMIT* in the middle of the procedure. You can do any number of
insertion into and deletion from temporary table and use "Select * from temp_table" to fetch a...
priyanka jolly
o
Nov 24th, 2007
Create Global temporary tables and say on commit preserve rows. The global temporary tables have
data available till the session is active. So you if you insert it at one procedure and want to access it
somewhere else you can do that very easily till the session is activeThanks Priyanka
Answer Question
JUN
082008
09:43 AM
2234
Views
2
Ans
KD09714
o
Oct 7th, 2009
We can set REMOTE_DEPENDENCIES_MODE inside init.ora parameter file to TIMESTAMP or
SIGNATURE.ALTER SYSTEM SET REMOTE_DEPENDENCIES_MODE = [TIMESTAMP|
SIGNATURE]
YugundharK
o
Oct 13th, 2008
Oracle manages dependency between referenced and dependent objects by using 2 modes1.
Timestamp mode2. Signature mode
Answer Question
092004
SEP
06:04 AM
4381
Views
9
Ans
Cursor is a named private SQL area from where information can be accessed. Cursors are
required to process rows individually for queries returning multiple rows.
rahulg5211
o
Oct 4th, 2009
Cursor is an small memory allocation or workstation where operation or processing is done on the
data.Types of attribute of cursor are-:1)ROWCOUNT2)ISOPEN3)FOUND4)NOTFOUND
krishnaindia2007
o
May 6th, 2008
Oracle uses work areas called private SQL area to Execute Sql statements and store information. A
cursor is a mechanism by which we can assign name to that private sql area , th...
Answer Question
092004
SEP
06:04 AM
33119
Views
9
Ans
What is PL/SQL ?
o
o
PL/SQL is a procedural language that has both interactive SQL and procedural
programming language constructs such as iteration, conditional branching.
surya72446
o
Sep 30th, 2009
PL/SQL stands for procedural languages extensions to SQL and it's theme is to hold a bunch of SQL
statements as a single function and return a single output.PL/SQL is advantageous compared to other
pr...
g_sidhu
o
Feb 16th, 2008
PL/SQL is the procedural extension to SQL with design features of programming languages. Data
manipulation and query statements of SQL are included within procedural units of code. PL/SQL
offers moder...
Answer Question
AUG
182008
04:44 AM
2761
Views
4
Ans
bmsrao
1. using AUTOTRACE
SQL> SET AUTOTRACE ON TRACEONLY
SELECT *
FROM emp
WHERE emp_name = 'ABC';
2. Using EXPLAIN PLAN
SQL> EXPLAIN PLAN for
SELECT *
FROM emp
o
Sep 13th, 2009
1. using AUTOTRACESQL> SET AUTOTRACE ON TRACEONLYSELECT * FROM
emp WHERE emp_name = 'ABC';2. Using EXPLAIN PLANSQL> EXPLAIN PLAN forSELECT
* FROM...
praveen_geek123
o
Sep 4th, 2008
Use "Explain Plan" command
Improve Answer
AUG
172008
06:52 AM
3229
Views
4
Ans
bmsrao
Retriving multiple records is a basic feature of SQL where we fetch the data using SELECT
statement.
SELECT *
FROM emp;
This itself gives us multiple records. There is no additional feature required to do the same in
PL/SQL.
At the same time, PL/SQL goes one step further and enable us to process these fetched rows one by
one (unlike the update statements which updates all the rows selected).
There are several options for fethcing data in different PL/SQL constructs:
1. Using Ordinary Cursor
2. Using Ref Cursor
3. Using PL/SQL bulk collect
4. Using PL/SQL arrays
But the important thing here is that irrespective of the way we fetch the data, we act upon them rowby-row.
promisinganuj
o
Sep 13th, 2009
Retriving multiple records is a basic feature of SQL where we fetch the data using SELECT
statement.SELECT * FROM emp;This itself gives us multiple records. There is no additional feature
requir...
Mad Hatter
o
Nov 4th, 2008
Multiple records at a time could be retreved in PL/SQL using BULK COLLECT.To do that you
define PL/SQL table, and load it using SELECT ... BULK COLLECT INTO <pl/sql table>FROM
..Optionaly could ...
Improve Answer
OCT
052008
12:01 AM
2829
Views
2
Ans
jaalioracle
o
Aug 18th, 2009
This can be done by a function called TABLE FUNCTION by means of this you can return more
number of rows and columns this is more effective than using ref cursorregards sen-prakash
rajivgupta780184
o
Oct 31st, 2008
If we want to return multiple row from a function then we can use ref cursor function .Example is
given below: create or replace function f1 return sys_refcursor as r1 sys_refcursor;begin open r1 fo...
Answer Question
APR
192007
06:06 AM
2163
Views
3
Ans
kartheek
samareshp
o
Aug 3rd, 2009
UTL_FILEThe Oracle supplied package UTL_FILE can be used to read and write files that are
located on the server. It cannot be used to access files locally, that is on the computer where the client
is ...
g_sidhu
With the Oracle-supplied UTL_FILE package, you can read from and write to operating system files.
It Provides security for directories on the server through the init.ora file. UTL_FILE Procedures
and ...
Answer Question
JUL
122007
05:46 AM
2196
Views
3
Ans
Rohith
Lakshmi84
o
Aug 4th, 2009
There is no difference btwn IS and AS while creating procedure,function,package
samareshp
o
Aug 3rd, 2009
Don't think there is any difference
Answer Question
092004
SEP
06:04 AM
5373
Views
6
Ans
o
Jul 31st, 2009
%ISOPEN - To check whether cursor is open or not.Returns true if cursor or cursor variable is open
or not otherwise false.%FOUND - To check wheteher cursor is found or not. Returns true if fetch
re...
samareshp
o
Jul 30th, 2009
There are five cursor attributes: %isopen, %found, %notfound, %rowcount and %bulk_rowcount.
%isopenWith %isopen it is possible to test whether a cursor was opened: %found%found returns true
when the la...
Answer Question
142008
MAY
04:03 PM
6297
Views
8
Ans
satyam_Ora
Hi,My questions is " Can function return more than one value".I have gone through the all
answers relevant to my question was been posted earlier. But all answers are confusing me.Few
people said directly that function can't return more than one value and few are telling that
function can return more that one value using OUT parameter or ref cursor.My understanding is
if out can't use as a parameter...
sen_sam86
o
Jul 23rd, 2009
Yes this can be possible by TABLE FUNCTION STEP - 1 CREATE TYPE ex_tabl_fun_obj AS
OBJECT (emp_name varchar2(20), emp_id NUMBER(2));STEP - 2 CREATE TYPE ex_tabl_fu...
javedans
o
Jul 8th, 2009
Its a universal truth that function can return only one value, but there are some tricks by using that
you can get more than one value , while function returning only one value.When you define functio...
Answer Question
262008
SEP
02:33 AM
2657
Views
1
Ans
ramesh.akula9
o
Jun 23rd, 2009
During the SQL tuning, there couple of things need to be considered1. If it is below Oracle 9i we
need make sure about the driving table concept (Since it uses RBO - Rule Based Optimization),
which im...
Answer Question
022006
MAY
05:26 AM
2610
Views
5
Ans
Bvreddy
r.kothandaraman
o
Jun 13th, 2009
We can set all the null value columns to some other values after that we can get all the corresponding
rows and columns of the table.
mala321
o
Dec 24th, 2007
Hello,NVL2 function is used to substitute a value for an expressionNVL2(string, value_if
_not_null_value, value_null_value) if the string contains a null vlaue ...
Answer Question
MAR
032006
06:38 AM
6722
Views
4
Ans
Naresh
grajeshkumar82
o
Jun 9th, 2009
PCode is the parsed Code of the Procedure which is ready forexecution... This is the code that is
loaded into the shared pool andexecuted for you.
g_sidhu
o
Jan 31st, 2008
Source code is the Text of the procedure.It is accessed from USER_SOURCE data dictionary view.Pcode is Compiled object code which is not accessible.
Answer Question
JUN
302008
02:11 AM
2513
Views
2
Ans
RollForward
kondla
o
May 21st, 2009
Rollforward is to Redo, as Rollback is to undo.
goelumesh
o
Jul 1st, 2008
Roll forward refers to the process Oracle goes through to apply changes contained in the redo log
files (both online and archive). The database clock (as measured by the system change number) is
moved...
Answer Question
JUN
262008
06:53 AM
2507
Views
2
Ans
ramyaselvi16
o
May 20th, 2009
Functions always return a value.Procedures do not.The use of IN, OUT, and IN_OUT parameters as
scalar values or ref cursors is dependent on your need and overall performance not on a pseudostandard as answered above.
KD09714
o
Jun 28th, 2008
Function must have return statement by which it returns one value.Though we can use out parameter
in function(function not getting called from select statement or DML), it is not good programming
prac...
Answer Question
DEC
162005
04:42 AM
4979
Views
18
Ans
sandeep kelkar
ravivenkat1234
o
Apr 28th, 2009
Functions can have multiple out Parameters one with Return Parameter and others can be IN OUT
Parameter to the function. this way a function can return multiple out parameters.Eg : Function ( a in
num...
krishnaindia2007
o
May 7th, 2008
1.Functions are used to computer a value.2.Function can return more than one value using out
parameter. But it is not a good practice to return more than one value in functions.3.Proced...
Sort by:
Answers
|
Date
Jump to Page:
14
FEB
252007
09:04 PM
1597
Views
2
Ans
sri
samareshp
o
Apr 22nd, 2009
Yes its possible.
bhushan_nemade
o
Feb 26th, 2007
Yes, its possible to have same name for package and the procedure in that package.
Answer Question
092004
SEP
06:04 AM
13239
Views
4
Ans
Exception is the error handling part of PL/SQL block. The types are Predefined and user
defined. Some of Predefined exceptions are.
CURSOR_ALREADY_OPEN
DUP_VAL_ON_INDEX NO_DATA_FOUND TOO_MANY_ROWS
INVALID_CURSOR ...
samareshp
o
Apr 17th, 2009
Hi all, Exception is nothing but Error. Exception can serve as an ALERT message also. (using
RAISE_APPLICATION_ERROR)There are two types of exceptions: 1> Pre-defineddefine exception
(2&g...
Lavanya Chowdary
o
May 6th, 2007
Exception is nothing but error in the PL/SQL program. If any error occured in the PL/SQL program
that terminates from the program. To handle that exceptions we are using exception handling part in
the...
Answer Question
OCT
202008
02:39 PM
10683
Views
5
Ans
Procedure Parameters
o
arunnaa
What is call by value and call by reference in parameters (IN, OUT, INOUT)?
Read Best Answer
o
Apr 17th, 2009
In Parameter:: call by reference OUT Parameter: call by valueIN OUT Parameter: call by valueif you
use the hint NOCOPY with OUT Parameter and IN OUT Parameter then ::: call by reference
lisha.varghese
o
Nov 16th, 2008
Three types of parameter modes1) IN parameter mode- This mode is used to pass values to the
calling module when invoked.The value of IN parameter can't be changed in the module.2) OUT
parameter mo...
Improve Answer
FEB
092006
02:55 AM
2146
Views
2
Ans
rajat
samareshp
o
Apr 15th, 2009
Sure, you can write plsql block inside exception.
Rupjit Roy
o
Feb 23rd, 2006
Yes you can write PL/SQL block inside exception section. Suppose you want to insert the exception
detail into your error log table, that time you can write insert into statement in exception part. To ...
Answer Question
JAN
09:23 AM
312006
2620
Views
10
Ans
Shweta_faqs
samareshp
o
Apr 15th, 2009
Function having a return type as Boolean ,can't be used in select statement.
krishnaindia2007
o
May 7th, 2008
In functions we can use all three types of parametershere is a simple exampleCREATE OR
REPLACE FUNCTION TEST_FUNC(A IN NUMBER, B IN OUT NUMBER,C OUT NUMBER)
RETURN NUMBER IS &n...
Answer Question
FEB
182009
12:06 AM
1920
Views
1
Ans
Auto Commit
o
sandeep_sb4
When we insert new values into the table using loops. Is it going to be auto commit or do we
need to commit manually?
chaitra murthy
o
Mar 19th, 2009
All the DML statement requires manual commit where as DDL statements are autocommitted.
Answer Question
MAR
012007
02:29 PM
2546
Views
5
Ans
ddkdhar
msenthil19
o
Mar 18th, 2009
Error will be like "Cursor already open"
ratna82
o
Oct 10th, 2008
CURSOR_ALREADY_OPEN ORA-06511 An attempt was made to open a cursor that was already
open.
Answer Question
JUN
202008
08:43 PM
2505
Views
4
Ans
Debug PL SQL
o
ramyaselvi16
o
Feb 24th, 2009
Use "SHOW ERRORS" command.Regards,Karthik
KD09714
o
Jun 28th, 2008
Stshekhar is right, oracle supplied package DBMS_OUTPUT with procedures PUT, PUT_LINE,
NEW_LINE etc in case of debugging pl/sql
Answer Question
JUL
172008
10:02 AM
2456
Views
4
Ans
usrkraju
What is the maximum size of the message that we can give in dbms_output.putline();
kantri
o
Dec 15th, 2008
The maximum size of package is 32kWe can't give more than that
jp_valapad
o
Aug 5th, 2008
255 bytes was the size limits of earlier version of oracle..ie prior to 10 g ..in 10g 32767 byte is the
limit..
Answer Question
JAN
312008
05:31 AM
1292
Views
2
Ans
sumanreddymca
Hi All,I want create a stored procedure by passing the parameter to top nth recordfor Excreate
proc test1(@x integer)asbeginselect top @x empid from emp order by empid descendwhen iam
executing iam getting error .Please let me know any other alternative way
shruti.potdar
o
Dec 10th, 2008
Solution to your problem:Create Procedure TEST1( p_num number)isv_eid number;begin select
empid into v_eid from EMPwhere empid=(select A.empid from (SELECT empid, rank() over (order
o
Jul 19th, 2008
create proc test1(@x integer)asbeginSELECT empid FROM (SELECT empid FROM emp
ORDER BY empid ) WHERE ROWNUM = @x;end
Answer Question
MAR
012007
02:43 PM
5843
Views
2
Ans
ddkdhar
saishradha
o
Dec 3rd, 2008
Pragma RESTRICT_REFERENCES is a compiler directive.It makes sure that the function maintains
the purity rules and code in fuction creation satisfy the purity rules.There are 4 values for
it.WNDS,RNDS,WNPS,RNPS.ThanksJai Sainath
Kullai Naidu
o
Mar 5th, 2007
By using pragma_restrict_references we can give the different status to functions,Like
WNDB(WRITE NO DATA BASE),RNDB(read no data base),Write no package state,read no packge
state.W
Answer Question
262006
MAY
05:23 PM
9350
Views
7
Ans
sbagai2001
saishradha
o
Nov 26th, 2008
Here is the answer in 1 lineIN-- value is used in a program.
It cannot be a variable .COuld be
literal,expression,value .OUT-- value is returned back from the progr...
raghav_sy
o
Jan 15th, 2007
hi friends,To make it simple, keep in mind,IN : It is a CONSTANT in the sub-program and u can not
modify its value in subprogram. if its value is modified in the s...
Answer Question
NOV
252008
11:30 PM
1658
Views
1
Ans
BulkBind
o
bhaskar_1977
o
Nov 26th, 2008
Bulk Bind is the facilty through which we can INSERT, UPDATE, DELETE or SELECT from
records from a table in bulk rather than multiple individual statments..Suppose you have 10 inserts to
be made so yo...
Answer Question
JUN
182006
11:02 AM
1538
Views
7
Ans
vssandilya
rajivgupta780184
If we want to return multiple row from a function then we can use ref cursor function .Example is
given below: create or replace function f1 return sys_refcursor as r1 sys_refcursor;begin open r1
for ...
pardhu323
o
Jul 20th, 2008
create or replace function f1 return sys_refcursor as r1 sys_refcursor;begin open r1 for select * from
emp; return(r1); end;call the funtion as :select f1 from dual;then it returns :CURSOR
STATEMENT :...
Answer Question
222008
SEP
10:24 PM
3593
Views
1
Ans
p_pramanik123
o
Nov 24th, 2008
rem -----------------------------------------------------------------------rem Filename: smtp.sqlrem
Purpose: Send e-mail messages from PL/SQLrem Notes: ...
Answer Question
NOV
11:52 PM
222007
2112
Views
5
Ans
Ramanjaneyulu
ammupriyaa
o
Ans : A & D
AshfaqueS
o
A and D
Answer Question
OCT
172006
02:37 PM
1363
Views
6
Ans
shamim909
todeepakmalhotra
o
Nov 10th, 2008
You cannot use the database name before the table name like db1.t1.we can only use a user
name and then table name. eg. let we have a user "deepak" then we can write select * from
deepak.t1 . We ca...
oozaifa
o
Nov 6th, 2008
Type schema name before table name or your id dont have the access to view the data from that table
Answer Question
172008
SEP
09:52 AM
3199
Views
1
Ans
ramesh.akula9
How to call a PL/SQL function in another PL/SQL function? Is it possible? Give example?
Jirange
Answer Question
JUL
162008
02:38 PM
2204
Views
2
Ans
babhatti
Mean I heard from Oracle 8i onwards the order of where clause condition does not matter
which oracle creates the explain plan...and execute..Is it true?
manoj_behera82
o
Aug 7th, 2008
Yes the order is important. But it is important for the performance of the query and not for the final
result. The output of the query will be the same irrespective of the order in which the join con...
gtomar
o
Aug 7th, 2008
Hi, Where Clause conditions execution are independent of order in explain plan but it reads top to
bottom.Thanks,Gunjan
Answer Question
AUG
272008
03:27 AM
2846
Views
3
Ans
ramesh.akula9
How to return more than one row through functions? Explain with example.
rajivgupta780184
o
Oct 31st, 2008
create or replace function f1 return sys_refcursor as
r1 sys_refcursor;
begin open r1 for select * from emp;
return(r1);
end;
call the function as: select f1 from dual;
Thanks & Regards
RAJIV GUPTA (ORACLE CONSULTANT)
YOGIK TECHNOLOGIES PVT LTD.
raghuprasad
o
Sep 1st, 2008
Eg: SELECT empname,sal
FROM employee_table
sal>MIN(sal);Hope the above statement executes.
092008
MAY
01:59 PM
4747
Views
5
Ans
pc_mts
If you don't own the sequence, you may look at all_sequences, which shows sequences in
other schemas that you have access to:select max_valuefrom sys.all_sequenceswhere
sequence_owner = '&sequence_owner' and sequence_name = '&sequence_name'
nandk.sharma
We can get the MAX value of a sequence by using the data dictionary view
'USER_SEQUENCES' .i.e. SELECT MAX_VALUE FROM USER_SEQUENCES
WHERE SEQUENCE_NAME='NAME_OF_SEQUENCE'
Answer Question Select Best Answer
SEP
052008
07:09 AM
1720
Views
1
Ans
External Table
o
ramesh.akula9
it is same as oracle table but act as view to the data available in an external file of a
physical drive,so here we can query the data and retrieve and can do anything but cannot
do manupulations on the data
Answer Question Select Best Answer
MAR
012007
02:29 PM
4884
Views
7
Ans
ddkdhar
vnraos
First, let us understand why these errors cropup.1) NO_DATA_FOUND - is raised only for
"select into" statements when the where clause of the query does not match any
rows.2)TOO_MANY_rows - is raised...
binurajnair
If you don't want an excpetion to be raised on a SELECT statement, you can avoid
executing the statement by having a count just before the SELECT as shown
belowSELECT count(rowid)into v_count from...
192008
JUL
02:48 PM
6015
Views
2
Ans
NIKKI_PRIYAL
raghuprasad
Inputting the date in PL/SQL is same as in SQL. Simply pass the date as a string in the
format DD-MON-YYYY.Eg: SELECT * FROM TABLE WHERE HIRE_DATE='dd-monyyyy'.OrYou can also use Date functions TO_DATE('25-aug-2008','......date
formate......');Hope this is the answer, you are looking for.Raghu.
rajivgupta780184
AUG
09:26 AM
192008
2561
Views
0
Ans
jkverma29
What steps should a programmer should follow for better tunning of the PL/SQL blocks?
Answer Question
252007
MAY
10:15 AM
1831
Views
1
Ans
monu
durgadas.menon
Unlike tables ref cursors do not store data. They act like mold to hold data during the
execution of the piece of code so proper coding and use of bind variables can help
decrease the burden of proces...
Answer Question Select Best Answer
152008
JUL
10:20 AM
1085
Views
1
Ans
Job scheduling
o
ramesh.akula9
This is the sample code you have to adjust time according to your requirementSET
AUTOPRINT ONVAR jobno NUMBER;BEGIN DBMS_JOB.SUBMIT(:jobno, 'JOBNAME;',
TRUNC(SYSDATE) + 6/24, 'TRUNC(SYSDATE + 1) + 6.183/24'); COMMIT;END;
ThanksRajiv
GuptaYogik Technologies Pvt. Ltd.
Answer Question Select Best Answer
OCT
062007
08:39 AM
1321
Views
6
Ans
shasi
rajivgupta780184
By using SQL LOAER, TOAD we can insert EXCEL file data into respective Table & we
can also create or upload ORACLE table data to .xls file from that.ThanksRajiv
GuptaYogik Technologies Pvt. Ltd.
rudhra97
By using sql*loader tool,we can convert flat files into oracle tables
Answer Question Select Best Answer
FEB
162006
10:31 AM
1003
Views
7
Ans
murthy
rajivgupta780184
BEGIN DBMS_OUTPUT.PUT_LINE('NON-UPDATABLE
TABLE'); ROLLBACK;END;ThanksRajiv GuptaYogik Technologies Pvt. Ltd.
SonuYadav
You can user sql%rowcount to check whether the dml does something or notegbegindelete
from tbl_xxxwhere col_yyy = 'ASDF';dbms_output.put_line (sql%rowcount);end;this way it
will return the no of rows deleted
Answer Question Select Best Answer
AUG
172006
05:09 AM
997
Views
5
Ans
Ritesh
rajivgupta780184
YOU CAN USE TEXT_IO.PUTLINE INBUILTSOR YOU CAN USE THE SPOOL
FUNCTION BOTH ARE APPLICABLE
hindol_saha
Spool c:filename.txtselect * from tab where ................;spool off;goto c: and check it.i think it
is the easyest way to store some data from oracle to flat file...u can save it in any extension
like .csv.xls.txt ect............
JUN
092008
03:50 AM
1290
Views
4
Ans
chengaiah
laxma823
Reuse
Answer Question Select Best Answer
NOV
272006
06:25 AM
21334
Views
8
Ans
sanjay desai
binurajnair
232008
JUL
02:35 AM
2119
Views
1
Ans
suash143
How to fill a refcursor with dataset in C#.i want to pass a dataset as parameter and fill a refcursor with the
same dataset.
viv_mca
you need to use ODP.Net connector.In OracleCommand object add OracleParameter object
with following propertiesOracleDbType = OracleDbType.RefCursor;Direction=
ParameterDirection.Output;give the name of your stored procedures's refcursor parameter
name
Answer Question Select Best Answer
APR
302008
04:39 PM
5441
Views
1
Ans
Analytical functions
o
Hsingh85
Analytic functions compute an aggregate value based on a group of rows. They differ from
aggregate functions in that they return multiple rows for each group. The group of rows is
called a window and ...
Answer Question Select Best Answer
DEC
122006
05:50 AM
12315
Views
6
Ans
Richa Kulkarni
PraGop
hi one more thing i wan to add abt NOCOPY, it is that its a hint to compiler, so its compiler
wish whether to follow this thing or not, so before using this just go through the conditions
when this th...
Answer Question Select Best Answer
152008
JUL
10:49 AM
1489
Views
1
Ans
ramesh.akula9
How can i choose which query is best?i.e On which factors i can choose the best query?
madanuprashanth
By forcing the SQL engine to use indexes.If query is too much nested then break it into two
or three queries using temp tables and then write one query by joining these temp table to
perform the task.
Answer Question Select Best Answer
092008
MAY
02:12 PM
1078
Views
2
Ans
pc_mts
How many columns you can create in table from this type "long raw"?
krishnaveni_g
Only single column is allowed per a table of data type LONG or LONG RAW
Answer Question Select Best Answer
FEB
02:18 PM
262008
2699
Views
1
Ans
nernernini
Hi Can anyone explain what this mean? I have practise PL/SQL about REF obj_type, my codes are:
CREATE or REPLACE TYPE home_type AS OBJECT (street VARCHAR2(50), city VARCHAR2(20), state
VARCHAR2(20), zipcode VARCHAR2(6), owner VARCHAR2(10));/CREATE TABLE homes OF
home_type;INSERT INTO homes VALUES ('300 Regina St', 'WATERLOO', 'ON', '010010',
'HFWANG');INSERT INTO homes VALUES ('301 Regina St', 'WATERLOO',...
krishnaveni_g
052008
JUL
12:23 PM
2801
Views
2
Ans
csprusty
Write a PL/SQL fuction named say TRUN, which does the same work as the oracle predefined function
"TRUNCATE".
ajaz_11i
It will truncate/delete all the rows in the table emp very fast as compared of delete
command, but the table must have no Foriegn keyMr. Ajaz Ahmad Kumar
sgbang
MAR
182008
01:35 AM
1826
Views
2
Ans
Temporary Tables
o
senthilkumard
Hi guys........Temporary tables means which tables are hold data temporarlyi mean these
holds the data certain time mainly only that session.exp:-create global temporary table
employ(emp_id number(10)...
Sort by:
Answers
|
Date
Jump to Page:
16
132008
MAY
06:43 AM
1702
Views
0
Ans
prashantjadhav5000
AUG
252006
11:00 PM
1270
Views
1
Ans
sudha periasamy
rampratap409
o
Oct 20th, 2006
You should put your question here. This forum is not a library. Please take care.
Answer Question
APR
302008
04:39 PM
1710
Views
1
Ans
Hsingh85
o
Jun 23rd, 2008
Specify Filler Load datatruncate into table empfields treminated by'|'(field1,field2 filler,field 3)
Answer Question
OCT
082007
09:46 AM
2431
Views
2
Ans
Amit Navapara
krishnaindia2007
o
Jun 23rd, 2008
Collection is an ordered group of elements all are of same time. Each element in the collection has
unique subscript to identify its position in the collection.Pl/sql offers three collection type...
ravgopal
o
Oct 10th, 2007
The following bullet points can be referred to when deciding what collection best suits a
particular solution .VarrayUse to preserve ordered list Use when working with a fixed set, with a
known number ...
Answer Question
OCT
302007
08:27 AM
1264
Views
3
Ans
prabhatushar
krishnaindia2007
o
Jun 23rd, 2008
Pragma is a compiler directive. It passes information to compiler. These are processed at compile
time not at runtime.
&nbs...
rajakumar_na
o
Nov 2nd, 2007
Pragma is a compiler directive. Using SQLCODE & SQLERRM we know that which ERROR code
is associate to what error.
Answer Question
122008
MAY
04:07 AM
1903
Views
1
Ans
Ananth.p
Hi,There is problem with ult_file.fopen. When I run from the server side, there is no issue with
utl_file and it is working fine.If I run the same procedure from Client machine, I am facing
problem. It throws an exception Invalid_operation.I am usingOracle 8.2 and Unix server.Can
you please let me know what change needs to be done? Is this related to permission issue.Thanks
& Regards,Ananth P
stshekhar
o
Jun 22nd, 2008
the parameter set in configuration file init.oraand UTL_FILE_DIR belongs to the directory structure
in oracle server machine. And the directory structure should be on same machine as oracle server.
Th...
Answer Question
AUG
072007
05:02 PM
1313
Views
3
Ans
Robert
Database has 100 tables and some of the tables dont have any data. I want to pullout those table
names from database in Oracle.
sr_2407
o
Jun 4th, 2008
Select table_name ,num_rows from user_tableswhere num_rows=0
ravgopal
o
Oct 10th, 2007
Analyze and perform statistics on whole schema. This will populate the statistics details about each
table. You can pull NUM_ROWS column from all_tables to check whether it ...
Answer Question
OCT
172007
07:25 AM
3668
Views
2
Ans
Raja
What are the types of cursors apart from explicit and implicit cursors ? Explain when and where
they are used ?
krishnaindia2007
o
May 31st, 2008
There are only two types of cursors in oracle Pl/sql.1. Implicit cursors2. Explicit cursors
define an explicit cursor as static or dynamic (REF CURSOR). ...
We can
Manoharan
o
Oct 25th, 2007
1. Implicit Cursor2. Explicit Cursor3. Ref CursorImplicit Cursor like SQL%rowcount,SQL
%rowtype...Explicit cursors are user defined cursorRef Cursor is object name of the cursor type. Its
mainly used for dynamic purpose
Answer Question
FEB
03:56 PM
132008
3644
Views
1
Ans
dgandhi
What exactly the difference between 'TABLE OF' and 'REF CURSOR' in PL/SQL?For what
purposes these both might be used?
krishnaindia2007
o
May 31st, 2008
A ref cursor is a dynamic cursor in which the contents of cursor can be changed dynamically at run
time depending upon our requirement.A ref cursor is basically a data type. A variable declared
based ...
Answer Question
FEB
162008
04:52 AM
8596
Views
5
Ans
Oracle triggers
o
maheshveeragoni
Can we issue rollback, commit in the trigger body. if we issue what is the result
krishnaindia2007
o
May 31st, 2008
We can use commit and rollback in trigers using autonomous transactions.- An atonomous
transaction is an independent transaction initiated by another transaction.- When an atonomous
transaction is cal...
arbind1982
Improve Answer
APR
162007
06:55 AM
1562
Views
4
Ans
ashishdixit
o
May 29th, 2008
desc has two meanings and depends on the usage.when used in sql plus as in the below stt.desc
<tablename>;it is taken as a sqlplus keyword and describes the table, dispalying column, constraints...
Sebastian Thomas
o
Aug 17th, 2007
DESC will display the values in DESCending order when used in an ORDER BY clause.For
example:SELECT * FROM empORDER BY empno DESC;
Answer Question
FEB
06:42 AM
242008
1764
Views
3
Ans
PL/SQL tables
o
jagadeesh9
o
May 29th, 2008
- Pl/sql is in memory representation of a table.- It is just a data type. ( Collection type)- It may store
any number of rows from table.Here is a simple exampleCREATE OR REPLACE PROCEDURE
TEST_...
tonyrobert
o
Mar 27th, 2008
INDEX By Tables composed of two components1. Primary key of data type
BINARY_INTEGER2. Column of scalar or record data type.Since this table is unconstrained, it
can increase its size dynamically....
Answer Question
MAR
122008
02:33 AM
2508
Views
4
Ans
ravenkumar
Give an example for calling procedure with user and system exception
krishnaindia2007
o
May 29th, 2008
Simple example for predefined exception CREATE OR REPLACE PROCEDURE TEST_PROC AS
A NUMBER ; BEGIN A := 'TEST'; DBMS_OUTPUT.PUT_LINE('THE VALUE OF A = '||A);
EXCEPTION WHEN VALUE_ERROR ...
ravenkumar
o
Mar 17th, 2008
set serveroutput on;create or replace procedure proc1 (emp_id in emp.employee_id%type, emp_na
out emp.last_name%type, emp_sal out emp.salary%type, emp_job out emp.job_id%type) is &...
Answer Question
APR
102008
11:27 AM
2185
Views
4
Ans
Kanhucharan
begin For i in 1..5 loop insert into A values(i); savepoint 1; end loop; rollback to savepoint 1;
commitend;--initially there are no data in table A. So my question is after execution of this block
what should be the data present in table A?
krishnaindia2007
o
May 29th, 2008
The first mistake in this code is savepoint 1;You can't give 1 as identifier. Identifier name must begin
with a letter.insert into A values(i);savepoint x;Here you are defining save...
satyam_Ora
o
May 6th, 2008
The flow of execution will be as below:step1: loop will execute 5 times and the variable value(i) will
store in the table a in series of values from 1 to 5.step2: all 5 values in series from 1..5 w...
Answer Question
JAN
312006
12:48 PM
1408
Views
3
Ans
ashwin.k
ashishdixit
o
May 28th, 2008
Exception is equivalent of an error in the code.This may be due to incorrect data or wrong coding
techniques. What ever the reason may be,when an error occurs in the plsql code, the command
terminates...
praveen.pinisetti
o
Apr 6th, 2006
There is a lot to explain the execution of exceptions.Whenever error is occured,the corresponding
exception will be raised and handled in Exception block.But in the case of nested blocks,The
exception...
Answer Question
092004
SEP
06:04 AM
3020
Views
2
Ans
Srinatha Reddy
o
May 21st, 2008
create table a ( b number, c number check (c >100) );create or replace trigger t1 before insert on a
begindbms_output.put_line('this is before insert trigger'); end;create or replace trigge...
prashant
Answer Question
APR
182007
05:28 AM
4378
Views
2
Ans
Chanukya Kumar
mosam
o
May 20th, 2008
U can not create thr private packages in oracle becoze packages can not be nasted
KiranKW
o
May 2nd, 2007
hi , i dont think there is something called as public package / private package. But yes the methods
defined in a package can either be public or private.Below is a simple expln.Variables and co...
Answer Question
092004
SEP
06:04 AM
1863
Views
5
Ans
All has given the right answer and I am repeating the same.There are the three component of
PL/SQL program block1) Declarative( Where you can decalre the variable which would be used as a
part of exce...
g_sidhu
o
Feb 16th, 2008
A PL/SQL block consists of up to three sections: declarative (optional), executable (required), and
exception handling (optional).
Answer Question
AUG
172006
06:47 AM
1724
Views
8
Ans
What will the Output for this Coding> Declare Cursor c1 is select
* from emp FORUPDATE; Z c1%rowtype;Begin Open C1;Fetch c1
into Z;Commit;Fetch c1 in to Z;end;
o
RamaKrishna.Yerra,TCS,Hyd,9989018508
satyam_Ora
o
May 8th, 2008
Please remove the commit from the begin statement and the it will execute properly.Thanks,
satyam_Ora
o
May 8th, 2008
DeclareCursor c1 is select * from emp FORUPDATE;Z c1%rowtype;BeginOpen C1;Fetch c1 into
Z;Commit;Fetch c1 in to Z;end; SQL> start e1 Declare * ERROR at line 1: ORA-01002: fetch out of
sequence...
Answer Question
AUG
272007
07:37 AM
1892
Views
4
Ans
suhasshah2007
krishnaindia2007
o
May 13th, 2008
Using wrap utility we can encrypt source code of a function to byte code (Not a readable format).
Becareful there is no decrypt utility to convert source co...
nitingalande
o
Jan 13th, 2008
Function can be encrypted using Oracle Wrap utility. this will prevent accessing from users without
permission
Sort by:
Answers
|
Date
Jump to Page:
17
JUL
06:39 PM
252007
2817
Views
2
Ans
Manjeet
DUAL is a part data dictionary and owned by SYS. You should not make modifications to this
table.
It contains only one row and one column of VARCHAR2 datatype.
Used to refer an object which does not have any pysical reference in database table.
Ex:- Select sysdate from dual.
krishnaindia2007
o
May 13th, 2008
DUAL is a part data dictionary and owned by SYS. You should not make modifications to this
table. It contains only one row and one column of VARCHAR2 datatype.Used to refer an object
which does not have any pysical reference in database table.Ex:- Select sysdate from dual.
jhoombrabar
o
Aug 16th, 2007
Because its a dummy table.
Improve Answer
182006
SEP
05:15 AM
2060
Views
7
Ans
suri
satyam_Ora
o
May 8th, 2008
Sql> update set col_name='value' where rownum<=500;Note: rowid will not work instead of
rownum for updating the 500 records.
askvenki
o
Jul 20th, 2007
hi guys i think rownum work only for at the time of select statement
Answer Question
AUG
152006
10:31 AM
1910
Views
3
Ans
Can we declare a column having number data type and its scale
is larger than pricesionex: column_name NUMBER(10,100),
column_name NUMBAER(10,-84)
o
ananth
satyam_Ora
o
May 8th, 2008
SQL> create table a2(a number(10,100)); Table created. SQL> create table a3(a number(10,84));Table created.
Oracle_learner
o
Sep 20th, 2006
Yes ,such declaration is possible .Explaining with example .1.number(9,11) means there are 11 digits
after decimal .However as the max precision is 9 so the rest are zero padded .Like
0.009999999992.n...
Answer Question
MAR
072007
12:00 PM
5138
Views
2
Ans
AT
krishnaindia2007
PL/SQL tables are temporary array like objects used in a PL/SQL Block. The size of pl/sql table is
unconstrained. For varrays we need to specify upperbound.Pl/sql tables can not be stored in
database ...
jaswanthi.p
o
Mar 8th, 2007
array is set of values of same datatype.. where as tables can store values of diff datatypes.. also tables
has no upper limit where as arrays has.
Answer Question
JUL
252006
03:34 AM
1926
Views
4
Ans
senthil
krishnaindia2007
o
May 7th, 2008
Whenever we execute DML statements oracle assigns a work area called private sql area to store
information. Cursors meachanism allows us to name that private sql area there by access information
...
Venkat9999
o
Sep 21st, 2006
I think your implict and explict cursor concent needs a correction:EXPLICIT CURSORS are used,
when you are getting more than a single row of data that needs to be processed further. Explicit cur...
Answer Question
JUL
192006
02:55 AM
1754
Views
4
Ans
rajanen
krishnaindia2007
o
May 7th, 2008
You can useUSER_ERRORSorSHOW ERRORSYou may also use DBMS_OUTPUT.PUT_LINE
pari
o
Mar 14th, 2007
The correct command isSHOW ERRORS orSHOW ERR
Answer Question
APR
012006
12:49 PM
10693
Views
5
Ans
nayan
krishnaindia2007
o
May 7th, 2008
The following are the main differences between nested tables and varray1. Nested tables are
unbounded where as varray has maximun limit.2. Nested tables are dense intially but can be sparse
latte...
g_sidhu
o
Feb 18th, 2008
Nested tables are unbounded. Initially dense but can become sparse through deletions. Order is not
preservedCan be indexed VARRAYs are always bounded(varying arrays have a limited number of
entr...
Answer Question
DEC
072005
03:59 AM
5122
Views
3
Ans
sandeep kelkar
krishnaindia2007
Generally to process large number of records in pl/sql we use cursors . But cursors process records
sequentially. It increases number of context switches between SQL and PL/SQL there by hampers
perfor...
Ashok kr. Choubey
o
Mar 4th, 2006
Hi ,Bulk Binding is used for avoiding the context switching between the sql engine and pl/sql engine.
If we use simple For loop in pl/sql block it will do context switching between sql and pl/sql engi...
Answer Question
JUL
082005
02:58 PM
14610
Views
5
Ans
o
May 6th, 2008
Definining two or more procedures with same name is called overloading of procedures. But they
must differ in no or order or datatype family of formal arguments.
g_sidhu
Overloading: Multiple subprograms of the same name Enables you to use the same name for
different subprograms inside a PL/SQL block, a subprogram, or a package Requires the formal
paramete...
Answer Question
092004
SEP
06:04 AM
1784
Views
2
Ans
BEGIN
krishnaindia2007
o
May 6th, 2008
[CREATE [OR REPLACE]] PROCEDURE procedure_name[(Optional Parameters)] {IS | AS}
[PRAGMA AUTONOMOUS_TRANSACTION;] [local declarations] BEGIN executable statements
[EXCEPTION exception handlers] END [name];
KiranKW
o
May 2nd, 2007
Create or replace procedure proc_name (optional parameters)as beginexecutable
statements;exception handlingend;end proc_name;
Answer Question
092004
SEP
06:04 AM
2432
Views
4
Ans
o
May 6th, 2008
This is from Oracle PL/SQL DocumentationA procedure has two parts: the specification (spec for
short) and the body.The procedure spec begins with the keyword PROCEDURE and ends with the
procedurename ...
salmankhan
o
May 26th, 2007
There Nothing like two parts of procedure..It is basically related to packages...Specification of
package and body of package
Answer Question
092004
SEP
06:04 AM
3118
Views
3
Ans
o
May 6th, 2008
Predefined exceptions are globally declared in standard package
g_sidhu
o
Jan 31st, 2008
PL/SQL declares predefined exceptions in the STANDARD package.
Answer Question
092004
SEP
06:04 AM
4558
Views
2
Ans
OLD and NEW are two virtual tables available during database trigger execution.UPDATE statement
has access to both old and new values.INSERT statement has access only to new...
bambino_chakma
o
Jul 15th, 2007
The two virtual table available are old and new.
Answer Question
092004
SEP
06:04 AM
3329
Views
3
Ans
There are two types of cursors, Implicit Cursor and Explicit Cursor.PL/SQL uses Implicit
Cursors for queries.User defined cursors are called Explicit Cursors. They can be declared and
used.
krishnaindia2007
o
May 6th, 2008
Cursors are of two types1. Implicit Cursors: - Whenever we execute sql statements oracle server
assigns a work area called private sql area to store precessed infomation. The most recently used ...
Lavanya Chowdary
o
May 6th, 2007
There r two types of cursors in the pl/sql1.Implici 2.explicit For the select stmt which is retrieving
single record or all the dml operations in the pl/sql program system automatically allocates...
Answer Question
MAR
012007
02:28 PM
2122
Views
6
Ans
ddkdhar
krishnaindia2007
o
May 3rd, 2008
IN :- actual parameter is passed by reference (a pointer to the value is passed in) OUT:- actual
parameter is passed by value (a copy of the value is passed out) unless NOCOPY is specified I...
ashwinee2
o
Apr 10th, 2008
Take this:IN parameters are passed by reference, so the value cannot be changed in the procedure and
functions.Out and IN-OUT parameters are passed by value, so the values can be changed inthe
procedures and fucnctions.
Answer Question
JUN
302006
04:52 AM
1334
Views
4
Ans
pankaj_gauba
krishnaindia2007
o
May 3rd, 2008
You can use either of them . Both are same.
amahanit
o
Both are same
Answer Question
NOV
152006
12:03 PM
10886
Views
3
Ans
dev
krishnaindia2007
Group functions returns one result per each group of the result setWhere as analytical functions
returns multi rows per each group i.e. using analytical functions we may display group results along
with individual rows.
dev
o
Dec 19th, 2006
Thank u Rampratap.Dev
Answer Question
122007
SEP
04:55 AM
2700
Views
3
Ans
Abirami
When a table is in state of transition it is said to be mutating. eg :: If a row has been deleted then
the table is said to be mutating and no operations can be done on the table except select.
krishnaindia2007
o
May 3rd, 2008
Mutate means chage. Mutating table is a table that is being modified by update, delete or insert
statement.
amahanit
o
Oct 13th, 2007
It's a table which is currently being modified by a trigger statement.
Answer Question
APR
052007
01:48 AM
1531
Views
3
Ans
subbaraovangalli
krishnaindia2007
o
May 3rd, 2008
To add primary key or unique key constraint Alter table tablename add constraint constraintname
primary key / unique (column name)To add check constraint Alter table tablename add constrai...
hindol_saha
o
Apr 9th, 2007
ALTER TABLE STUDENT ADD CONSTRAINT PK_STD_ID PRIMARY KEY (STUDENT_ID);
Answer Question
APR
292008
02:56 AM
2000
Views
0
Ans
Nested tables
o
jannaat
FEB
132008
10:44 PM
977
Views
1
Ans
Pavithara
182006
JUL
10:07 AM
866
Views
5
Ans
umadevi
Noel Lastra
FEB
252008
01:30 PM
1205
Views
1
Ans
jagadeesh9
Normal Table : It contain rows and columns.Each Row-Column represente only one value
i.e intersection of Row-Columncreate table t1(col1 number(10), col2 varchar2(9));----->Creates normal tabl...
Answer Question Select Best Answer
JAN
082007
06:21 AM
1826
Views
5
Ans
preethi
ae_sathis
Whenever the exception is raised ..all the transaction made before will be commited. If the
exception is not raised then all the transaction will be rolled back.
Answer Question Select Best Answer
262006
MAY
05:45 PM
11212
Views
6
Ans
sbagai2001
shinehere
A autonomous transaction starts with the first sql statement of the pl/sql block and ends with
a commit. It starts within the context of an another transaction called parent transaction and
independen...
Answer Question Select Best Answer
FEB
202008
08:03 AM
1981
Views
0
Ans
kshasikumar
User Interface accepts the Employee information and this data needs to be compared with the existing
data and the differences needs to be populated through a Pl/SQL table.Create a type (EMP_DATA) to
populate the Employee table data.Create a type (ERR_TABLE) with the following attributes:ERR_NO
NUMBER,ERR_COLUMN VARCHAR2(50),ERR_RESULT VARCHAR2(500)Create a package
USER5_PKG1 with two procedures....
Answer Question
NOV
062007
02:14 AM
1785
Views
2
Ans
Mukti
"Could not find the Program unit ? "Can any one tell exactly why this happens.I had validated all the
objects and even released all the Locked objects . But still this error persisted .
binurajnair
This error can occur in the following scenario also. The application has a constant
connection with the database and a package which the application uses gets recompiled.
And the recompiled package co...
raj_imr2000
Hi,ORA-06508:PL/SQL: could not find program unit being calledCause:An attempt was
made to call a stored program that could not be found. The program may have been
dropped or incompatibly modified, or ...
Answer Question Select Best Answer
032007
JUL
01:23 AM
1790
Views
3
Ans
Sushma
g_sidhu
We cant use functions with OUT parameter in sql statements because there is no way for
you to declare a variable in a SQL query and in order to call an IN OUT -- you need a local
variable (to supply a value to be read from and to supply a place to put the out value into).
ramaswamy
o
Functions with "out" parameters cannot be used in SQL statments however I disagree with
you rajeev because functions without parameters can also be called in select statments as
long as they havea return() (Eg: SYSDATE)
Answer Question Select Best Answer
MAR
222007
04:36 AM
4646
Views
5
Ans
ily_saravanan
What is Pragma Init Exception ? what is difference between user defined exception and init pragma
exception. what is the use of it.
g_sidhu
You trap a nonpredefined Oracle server error by declaring it first, or by using the OTHERS
handler. The declared exception is raised implicitly. In PL/SQL, the PRAGMA
EXCEPTION_INIT tells the compiler...
Sachin Kale
o
Pragma is a compiler Directive that is process at compile time, Not at run time.In pl/sql the
Pragma Exception_init tells the compiler to asociate an exception name with an oracle error
number.That le...
Answer Question Select Best Answer
OCT
252006
10:32 PM
3073
Views
5
Ans
ambuji david
g_sidhu
Triggers on system events can be defined at the database or schema level. A trigger
defined at the database level fires for all users, and A trigger defined at the schema or table
level fires only when the triggering event involves that schema or table.
rampratap409
In database trigger: Trigger for a table /view is a database triggerlike ( before , insert *
update, delete, insert * row level, statement level)2 * 3 * 2 = 12 + instead off tr...
Answer Question Select Best Answer
OCT
182006
11:11 AM
1723
Views
4
Ans
dev
g_sidhu
Oracle9i introduced Flashback Query to provide a simple, powerful and completely nondisruptive mechanism for recovering from human errors. It allows users to view the state of
data at a point in time...
joybanerjee
when ever a table is dropped the database does not release the space assotiated
with it the table is kep...
Answer Question Select Best Answer
JUN
112006
04:34 AM
6039
Views
6
Ans
manali
g_sidhu
A pragma is compiler directive. Pragmas are processed at compile time, not at run time.
They pass information to the compiler.
g_sidhu
Using Named & Combination Parameter passing Methods you can change the order of
parameter in a procedureNamed: List actual parameters in arbitrary order by associating
each with its corresponding ...
Answer Question Select Best Answer
JUN
062006
02:56 PM
1642
Views
3
Ans
rajanipriya
g_sidhu
A table is said to be a Mutating table under the following three circumstances1) When u try
to do delete, update, insert into a table through a trigger and at the same time u r trying to
select the sa...
Answer Question Select Best Answer
JAN
06:54 AM
252006
2556
Views
3
Ans
Indira rani
g_sidhu
Before a PL/SQL program can be executed, it must be compiled. The PL/SQL compiler
resolves references to Oracle objects by looking up their definitions in the data dictionary.
Then, the compiler assig...
chaitu
o
SEP
092004
06:04 AM
2651
Views
2
Ans
o
o
Some scalar data types such as NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN.Some
composite data types such as RECORD & TABLE.
g_sidhu
SEP
092004
06:04 AM
3719
Views
6
Ans
PL/SQL uses block structure as its basic structure. Anonymous blocks or nested blocks can be used in
PL/SQL.
g_sidhu
PL/SQL is a block-structured language, meaning that programs can be divided into logical
blocks. A PL/SQL block consists of up to three sections: declarative (optional), executable
(required), and exception handling (optional).
Me
o
DeclarationBeginException HandlingEnd
Answer Question Select Best Answer
OCT
242006
11:03 AM
2614
Views
6
Ans
padma radhika
psiva_oracle
Database Server: A computer in a LAN dedicated to database storage and retrieval. The
database server is a key component in a client/server environment. It holds the database
management system (DBMS) ...
Answer Question Select Best Answer
APR
292007
05:30 AM
6565
Views
2
Ans
RAJASEKARAN
g_sidhu
Application trigger: Fires whenever an event occurs with a particular application Database
trigger: Fires whenever a data event (such as DML) or system event (such as logon or
shutdown) occurs on a schema or database
Sumit Tiwary
o
Database triggers are backend triggeres and perform as any event occurs on databse level
(ex. Inset,update,Delete e.t.c) wheras application triggers are froentend triggers and
perform as any event taken on application level (Ex. Button Pressed, New Form Instance
e.t.c)Rgds,Sumit Tiwary.
Answer Question Select Best Answer
JUN
212006
05:12 AM
4432
Views
7
Ans
risham
Sudhir Sorout
Yes when we truncate instead of delete, for deleting records , truncate set the HWM to 'zero'
but if we use only delete then HWM remain same ......Sudhir Sorout
g_sidhu
Within a segment, the high water mark indicates the amount of used space, or space that
had been formatted to receive data.You cannot release space below the high water mark
(even if there is no data ...
Answer Question Select Best Answer
OCT
182006
09:53 AM
2032
Views
5
Ans
dev
g_sidhu
Triggers on system events can be defined at the database or schema level. A trigger
defined at the database level fires for all users, and a trigger defined at the schema or table
level fires only whe...
Nasim
o
Hiif we have created a view that is based on join codition then its not possibe to apply dml
operations like insert, update and delete on that view. So what we can do is we can create
instead off trig...
Sort by:
Answers
|
Date
Jump to Page:
19
JUL
262006
03:37 AM
4108
Views
5
Ans
rajanen
g_sidhu
Nishant Patel
o
Jun 13th, 2007
The difference between the two can be categorised via: Stored subprograms ans Application
subprograms1) Stored subprograms: These are coded and compiled from within the Oracle
database via SQL Plus e...
Answer Question
JAN
232008
09:36 AM
1191
Views
1
Ans
prk_cbz
What are the diffrences between Oracle 8i and Oracle 9i as a Developer, not as a DBA??
bismitapadhy
o
Feb 3rd, 2008
ISQl*plus and J-server is not there in oracle-8i which are there in 9iBismita
Answer Question
032006
MAY
07:23 AM
2160
Views
4
Ans
shami
g_sidhu
o
Feb 1st, 2008
Force View: creates the view regardless of whether or not the base tables exist or whether the user
has privileges on them. The user still cant execute the view, but he or she can create it. No...
Lavanya Chowdary
o
May 6th, 2007
Generally we are not supposed to create a view without base table. If you want to create any view
without base table that is called as Force View or invalid view. Syntax: CREATE FORCE VIEW AS
< SELEC...
Answer Question
022006
MAY
03:46 AM
1655
Views
4
Ans
Ashvini
g_sidhu
o
Feb 1st, 2008
SELECT object_name, object_typeFROM user_objectsWHERE object_type in
('PROCEDURE','FUNCTION')ORDER BY object_name;
Sphurti
o
Aug 14th, 2006
Basically, here USER_OBJECTS will have all the objects which are created/own by a particular user
whereas ALL_OBJECTS will have information of the objects for which a user has access, it may or
may not be created by that user.
Answer Question
APR
252006
11:41 PM
2758
Views
6
Ans
kameshakundy
g_sidhu
o
Nov 12th, 2006
Dear Kamini,May I know what do you mean by PG
Answer Question
MAR
082006
06:27 AM
2026
Views
4
Ans
Nitin Joshi
g_sidhu
o
Feb 1st, 2008
If a single DML statement fails during execution of a transaction, it s effect is undone by a statementlevel rollback, but the changes made by the previous DML statements in the transaction are not
discarded. They can be committed or rolled back explicitly by the user.
Chiru
o
Jun 21st, 2006
When a DML statement executes (fails/sucess) an automatic Commit is executed. Eg : Create a
table t1. Insert a record in t1. Then again to create the same object t1.
Answer Question
FEB
092006
10:11 AM
1326
Views
6
Ans
Shweta_faqs
g_sidhu
o
Jan 31st, 2008
Cursor variables are like C or Pascal pointers, which hold the memory location (address) of some
item instead of the item itself. Thus, declaring a cursor variable creates a pointer, not an item. In P...
nisha
o
Aug 24th, 2006
ref cursor is a simple cursor but it is a datatype that allow developers to declare cursor variableref
cursor has 2 types:-strong ref cursor where we mention the return type with rowtype.weak cursor w...
Answer Question
092004
SEP
06:04 AM
3215
Views
2
Ans
SQLCODE returns the latest code of the error that has occurred.SQLERRM returns the relevant
error message of the SQLCODE.
g_sidhu
o
Jan 31st, 2008
SQLCODE: Returns the numeric value for the error code SQLERRM: Returns the message
associated with the error numberSQLCODE Value
&nbs...
acpsrinivas
o
Feb 25th, 2006
Pl / Sql Provides Error Information via two Built-in functions, SQLCODE & SQLERRM.SQLCODE
Returns the Current Error Code.
&nb...
Answer Question
092004
SEP
06:04 AM
2312
Views
4
Ans
g_sidhu
o
Jan 31st, 2008
In addition to modularizing application development , stored procedures and functions have
thefollowing benefits:1) Improved performanceAvoid reparsing for multiple users by exploiting the
shared SQL a...
deviji2000
o
Oct 16th, 2007
procedures and function hv many benefits in addition to modularizing application
development.1)
easy maintenance : sub programs are lo...
Answer Question
092004
SEP
06:04 AM
1662
Views
2
Ans
The two parts of package are PACKAGE SPECIFICATION & PACKAGE BODY. Package
Specification contains declarations that are global to the packages and local to the
schema.Package Body contains actual procedures and local declaration of the procedures
and cursor declarations.
g_sidhu
o
Jan 31st, 2008
A package usually has a specification and a body, stored separately in the database.The specification
is the interface to your applications. It declares the types, variables, constants, exceptions, cu...
Mahesh Argade
In addition to this Both Package Spec and Package Body are stored separately in the Data
basePackage specifications act as an interface for the Package
Answer Question
092004
SEP
06:04 AM
4416
Views
5
Ans
o
Jan 31st, 2008
A procedure is a named PL/SQL block that can accept parameters (sometimes referred to
as arguments), and be invoked. Generally speaking, you use a procedure to perform an action. A
procedure has ...
ramesh_resides
o
Jun 23rd, 2007
Stored procedure is a sub program and stored in memory for repated execution
Answer Question
022005
SEP
06:41 AM
3532
Views
10
Ans
It is not possible. As triggers are defined for each table, if you use COMMIT of
ROLLBACK in a trigger, it affects logical transaction processing.
g_sidhu
o
Jan 31st, 2008
COMMIT, ROLLBACK, and SAVEPOINT statements are not allowed within the trigger body. It is
possible to commit or rollback indirectly by calling a procedure, but it is not recommended because
of side effects to transactions.
jockey
o
Aug 2nd, 2007
Using autonomous_transaction it is possible
Answer Question
092004
SEP
06:04 AM
9431
Views
3
Ans
o
Jan 31st, 2008
When referencing the current row from an explicit cursor, use the WHERE CURRENT OF clause.
This allows you to apply updates and deletes to the row currently being addressed, without the need
to explic...
Shefali
o
Aug 16th, 2006
"WHERE CURRENT OF" clause is used for updating or deleting rows selected by the cursor with
FOR UPDATE cluase.It explicitily locks the row for updating or deleting.
Answer Question
292007
MAY
09:14 PM
813
Views
3
Ans
physical
mittu
o
Jan 22nd, 2008
Right click on package and choose [execute]elseexecute package_name;
Larry
o
Nov 6th, 2007
Execute package_name;
Answer Question
JAN
152008
01:44 PM
1445
Views
0
Ans
mnmlove
For each hour, list the number of called, total transactions' values, and total duration?if you have
these tables:1- 'calls'columns: called_number, Customer_ID, call_date, call_time_started,
Call_time_ended,transaction_no.2- 'tariff'columns: Tarriff_per_Sec, country_code, time_started,
time_ended.
Answer Question
OCT
252007
02:22 AM
1065
Views
1
Ans
vijay
gan20k
o
Jan 14th, 2008
This will delete Collection (eg index by table ) in the range 6,3
Answer Question
JUN
262007
03:48 PM
1876
Views
1
Ans
Kalyan
nitingalande
o
Jan 13th, 2008
OCI stands for Oracle Call Interface, it is a interface api used to access oracle database from C
programs. Data Guard stands for it is multiple DB servers enviornment configured for Physical as
well ...
Answer Question
AUG
022007
05:06 AM
874
Views
1
Ans
hiavijit
jayanthanr
o
Jan 8th, 2008
To created flat files, or read flat files in a procedure or function, the built-ins in the UTL_FILE
package can be used.
Answer Question
OCT
162007
03:44 PM
3804
Views
2
Ans
rk2007
kirangsv
o
Jan 6th, 2008
A collection can be loosely defined as a group of ordered elements, all of the same type that allows
programmatic access to its elements through an index. Commonly used collection types used in the
pr...
dev5000
o
Dec 26th, 2007
It is kind of datatype.Collection is nothing but a convenient way to manipulate many variables at
once.There are 3 types of collection.1. INDEX BY TABLE2. NESTED TABLE3. VARRAYS
Answer Question
AUG
132007
02:36 AM
6869
Views
3
Ans
narendrareddy2414
kirangsv
o
Jan 6th, 2008
Well there is no difference between is/as as they said both r one and the same when i have gone thru
the book u can use either is / as
cutesree
o
Dec 17th, 2007
There is no difference between is/as ... is is used for creating a new procedure with a new name
where as 'as' is used to create a new procedure with existing procedure name... it will not display
"procedure already exists".
sivaprasadpm
How to pass result set using refcursor from one package procedure to another package procedure? and
code also
MAQDOOMAAMER
Profile Answers by MAQDOOMAAMER Questions by MAQDOOMAAMER
SEP
262007
03:56 AM
1122
Views
1
Ans
dinu78
Muhammad Fayyaz
1) First identify the current excecution plan by using showplan.In most cases, creating and
then forcing usage of the indexes result in drastic improvement .1) Ensure that indexes(single
or composite)&...
Answer Question Select Best Answer
OCT
162007
05:55 AM
1925
Views
1
Ans
preeti
DEC
042007
03:56 AM
2661
Views
1
Ans
joybanerjee
soorajsk_84
AUG
272007
12:44 AM
2449
Views
3
Ans
What are purity rules for functions? why they use ? what effects
if not follow these rules?
o
suhasshah2007
joybanerjee
The purity level defines what structure the function reads or modifies.the types of purity
level:1)wnds--write no database stage I.e&n...
malik.aman
To be callable from SQL statements, a stored function (and any subprograms called by that
function) must obey certain "purity" rules, which are meant to control side effects:When
called from a SELECT ...
Answer Question Select Best Answer
AUG
022006
12:12 PM
1108
Views
7
Ans
Rama Krishna.Y
deepakonroll
OCT
112007
06:13 AM
1014
Views
1
Ans
we have a PRIMARYKEY field with auto generation in sequence of a table of records. If we delete any
one of records from the table, how can we update the table implicitly using Trigger?
amahanit
Which table u want to update ,in case if it is the same table then write after delete trigger on
the table and select values from destination table.
Answer Question Select Best Answer
SEP
062007
11:13 AM
866
Views
1
Ans
kowmudiswarna
amahanit
OCT
082007
03:19 AM
995
Views
3
Ans
amahanit
santosh_pokiri
Function: Whenever a function executes it returns value .ex:create or replace function sum(x
number)asy number;begin y:=x+2; return y; -- this ...
amahanit
hi ravgopal i got u'r reply,thanks. but there is still one query ,in procedures OUT and INOUT
parameters are copied from actual parameters to formal parameters(it takes extra time),so
to...
Answer Question Select Best Answer
MAR
212007
07:23 AM
6100
Views
2
Ans
Pavan
Kavitha
o
OCT
05:16 AM
192006
2591
Views
9
Ans
Surendran
sankar
o
We have prdefined table 'col'. from this table we can find the column names dynamically.
For ex. select cname from col where col=1 and tname='emp' then you will get first clomun
name of emp table...
Naresh Dantu
o
OCT
302007
08:15 AM
1415
Views
1
Ans
prabhatushar
prabhatushar
ORA - 01426 is associated with Numeric overflow Cause : Evalution of an value expression
causes an overflow or underflow.Action : Reduce the operand
Answer Question Select Best Answer
APR
042006
10:22 AM
13745
Views
7
Ans
sairlen
Sumeet Lalvani
o
OCT
132006
11:16 AM
1456
Views
4
Ans
shamim909
gkbiswal
It(autonomous transaction) will work but it'll not satisfy your business requirement. Mutating
error is not actually an error but Oracle has provided this feauture to do away with any si...
trupti
o
Hi, you can use pragma autonomous_transaction for mutating trigger ie after declare, the
first statement is pragma autonomous_transaction.
try it,
it really works!!
Answer Question Select Best Answer
212006
JUL
07:37 AM
1196
Views
2
Ans
mkatpatal
manish dudhe
o
Hi Mukund!!
You have to return the selected cursor as OUT parameter and again you
have to fetch the data from that OUT cursor..Thanks&RegdsRamki
Answer Question Select Best Answer
SEP
092004
06:04 AM
3514
Views
3
Ans
o
o
A cursor declared in a package specification is global and can be accessed by other procedures or
procedures in a package.A cursor declared in a procedure is local to the procedure that can not be
accessed by other procedures.
divyesh
o
Ref cursors are used when you want cursor to hold any no. of columns in the row.If you are
not sure about row type at complile time you use ref cursors.Sys_ref_cursors used when
you want cursors to be passed from one procedures to another procedures or functions.
ddkdhar
If we declare in package body then what is difference b/w cusrsor..........?how many types of
refcursors..............?whata re the advantages of ref cursors....................?
Answer Question Select Best Answer
AUG
302006
12:59 AM
1619
Views
5
Ans
amahanit
RamaKrishna,TCS,Hyd 9989018508
1) make the trigger as a statement level trigger.2) if u want to use :old and :new qualifer
then create 2 trigger ,1st before insert trigger and use PL/SQL table to select the values,2nd
after insert trigger and insert the values from PL/SQL tables.
be17be
NOV
232006
04:48 AM
1687
Views
3
Ans
ily_saravanan
ravgopal
We can do either DDL or DML inside a function.1) Let us try keeping a DML inside a
function 1 create or replace function test (a number) return number as 2 begin 3 ...
vaibhav Tyagi
o
The main difference is in Function you can perform only DDLbut in Stored
procedure you can perform DDL, DML both
Answer Question Select Best Answer
SEP
272007
05:53 PM
2564
Views
2
Ans
Rajesh
How can I write a function which returns previous business date of given input date1. skip holidays when
you find previous day2. skip Sunday and saturday's when you find previous dayUS holidays are defined
in HOLIDAYS tabledate, holiday_desc1-Jan-2007 New Year
ravgopal
If you need to get the previous business date, just change the in_dt variable in declaration
to input_dt date := '&Dt';in_dt date := input_dt - 1;
ravgopal
Did you find the solution? if not then, here it is..try thisa) Create the sample table
holiday : create table holiday (h_dt date, h_desc varchar2(100));b) let us feed some
records;Inse...
Answer Question Select Best Answer
SEP
122006
02:15 AM
1241
Views
4
Ans
Ramya
vaibhav Tyagi
o
Sort by:
Answers
|
Date
Jump to Page:
21
JUL
08:14 AM
202007
1770
Views
1
Ans
kumar sai
Rushikesh
o
Sep 25th, 2007
To be callable from SQL statements, a stored function must obey the following "purity" rules, which
are meant to control side effects:1. When called from a SELECT statement or a paralle...
Answer Question
JUN
122007
07:34 PM
3458
Views
2
Ans
madhug56
devi
o
Jun 20th, 2007
EXCEPTIONWHEN No_privilages THENhtp.p( ' Access denied');WHEN Rec_expired
THENhtp.p('Other user has changed this record,Query the record and Update');WHEN OTHERS
THENHtp.p(SQLERRM);
Answer Question
052007
SEP
10:25 AM
1137
Views
1
Ans
senthil27583
devi123
o
Sep 25th, 2007
Declare the collection variable (varrys or PL/SQL tables) as out parameter for the procedure and
fetch the result set into collection variable.
Answer Question
182007
SEP
05:25 AM
1790
Views
1
Ans
kartheek
Vaibhav Tyagi
o
Sep 25th, 2007
You cannot move existing table into a cluster. You can create new tables though, including tables
with the same contents as existing tables. In the second. form, query returns a set of rows which...
Answer Question
JUN
252007
05:34 AM
956
Views
1
Ans
Is there any way (other than recreating the sequence) to set the
currVal and nextVal in a sequence to some value different from
its actual value?
o
Rahul B
dearvandna
o
Sep 21st, 2007
No. but maybe associative arrays can help
Answer Question
AUG
012007
06:58 AM
1623
Views
1
Ans
mohammed sibghatullah
dearvandna
o
Sep 21st, 2007
Normally use it as sql%type or sql%rowtype. But if you are using a cursor then use it cursorname
%type or cursorname%rowtype.
Answer Question
222007
MAY
02:03 AM
2352
Views
1
Ans
spooja
Ravindra Reddy
o
Sep 5th, 2007
Cursor is a private SQL area.. its a temporary buffer used to hold the
transactional data on it n used to manipulate multiple rows through PL/SQL block
statements.
Temporary table can hold the records permanently and we can do DML operations
on this..
ok
Cheers
Rav'i'ndra Reddy
Answer Question
122007
MAY
11:11 PM
969
Views
2
Ans
brahmaiah
Ravindra Reddy
o
Sep 5th, 2007
The PL/SQL Blocks are 2 types1. Ananymous Block2. Named Block1. Ananymous Block means
with out any name.Ex:- Declare<variables>Begin<Exec Statmts>ExceptionEnd.2. Names Block
are ...
Sanjay Bharti
o
Jun 13th, 2007
Hi All,I am new to this community. It seems the question is related to Begin End block of PL/SQL.
See if you do not want to write any procedure and you want to do some sequence of operation that
inclu...
Answer Question
AUG
312006
03:39 AM
1523
Views
7
Ans
srikanth
utham
o
Sep 4th, 2007
Identity is a SQL Server concept The better way to do is use the alter command
Sandip Bhattacharjee
o
May 12th, 2007
SQL> ALTER TABLE EMP ADD SR_NO INT IDENTITY(1,1) 2 ;ALTER TABLE EMP ADD
SR_NO INT IDENTITY(1,1)*ERROR at line 1:ORA-01735: invalid ALTER TABLE optionThe
above commands is not working. Pls specity what do you mean by identity(1,1)
Answer Question
AUG
272007
02:34 PM
1785
Views
1
Ans
Chitendra ranjan
archie123
o
Aug 28th, 2007
Yes you can use commit or rollback in exception block;select * from test123;A----------51 Declare s
varchar2(2); Begin update test123 set a = a+10; select a into s from test123 where a=20; exception...
Answer Question
AUG
272007
08:08 AM
1529
Views
0
Ans
to get the report output in a file which has the start date and end
date in it's name.
o
sk
Answer Question
FEB
182006
05:59 AM
4128
Views
5
Ans
skmishra_it
jiten
o
Aug 27th, 2007
%type will use for to define at column level.%rowtype is used to define for one or more than one
columns ( like row or record or tuple ) means its user define type which hold one or more than one
columns along with it. and generally it used with Cursor.
srikanthvijay8
o
Jul 2nd, 2007
If you use a cursor, you can return cursor values only by rowtype only.
Answer Question
092004
SEP
06:04 AM
2158
Views
3
Ans
DECLARE CURSOR cursor name, OPEN cursor name, FETCH cursor name INTO or
Record types, CLOSE cursor name.
fancyoracle
o
Aug 14th, 2007
There are two ways of processing a cursor output. These mainly depend on the type of cursor used.
Cursors can be1) Static
: Declared in declarations section with a defina...
geetha24
o
Feb 13th, 2007
FOR record_index IN [cursor_name | (SELECT statement)]LOOP executable_statement(s)END
LOOP;
Answer Question
202005
SEP
10:51 AM
1150
Views
4
Ans
Kishorebabukm
askvenki
o
Aug 12th, 2007
By using cursor parameters we can pass the value dynamically. So that cursor can fetch data as per
parameter
gopal
o
Dear sir,
deptno...
declare
Answer Question
AUG
dep_num number;
082007
02:32 PM
1847
Views
0
Ans
How to export SQL XML using SQL or PLSQL or dynamic SQL for
Oracle data from Oracle database.
o
jakilati
For example: I have 100's of tables and I need to take the data from database and export as a xml
file.
Answer Question
JAN
222007
08:07 AM
1277
Views
3
Ans
Tejaswini
lieni
o
Jul 30th, 2007
You add the psedocolumn rowid to the selected fields of the cursors body.This rowid identifies the
selected record uniquely so that you can update with it, like with the primary key (just faster).Update
tab where rowid=cur_rec.rowid;
nagurtilak
o
Mar 15th, 2007
It can be used in cursorsIf we want to update the current record (i.e cursor holding the current
record) we can use WHERE CURRENT clauseEg. UPDATE empSET sal=sal*10FROM emp
WHERE CURRENT of "cursor name"
Answer Question
MAR
202006
05:31 AM
1516
Views
5
Ans
sweety
lieni
o
Jul 30th, 2007
Yes you can pass the whole select statement of the cursor dynamicaly, see ref_cursors.There is also a
system package sys.dbms_sql which allows everything to make dynamically.
CHINMAY
o
Jun 27th, 2007
Yes,You are right we can only pass the value for where clause in paramterised cursor
Answer Question
JUN
222007
06:03 AM
913
Views
1
Ans
rsundararajan_in
Answer Question
302006
MAY
05:12 AM
2074
Views
4
Ans
Parag
Srinivasa Bhargava
o
Jul 27th, 2007
You have to index the columns properly and make sure that driving columns of the composite
indexes are used in the query .You may as well wish to rebuild indexes as the number of records is
increased.
Syed Jawahar
o
May 31st, 2006
HIYOU CAN SPEED UP THE QUERY BY USING THE ROWID IN THE SELECT STATEMENT.
Answer Question
APR
04:51 AM
242007
1852
Views
1
Ans
srikanth kumar
Kamal Mohapatra
o
Jul 23rd, 2007
You must be speaking about PLS_INTEGER. PLS_INTEGER, uses machine-arithmetic unlike
BINARY_INTEGER which uses library arithmetic. As such PLS_INTEGER is somewhat faster than
BINARY_INTEGER. Also BINARY_INTEGER has subtypes. I don't think PLS_INTEGER has
subtypes
SEP
292006
01:09 PM
4345
Views
4
Ans
mathewsumoth
askvenki
rowchaining works for varchar2 datatype which will allocate memory dynamicallysuppose
thier is column name varchar2(20);first value-- venki which is 5changed to venki12 which is
7then oracle will cr...
rampratap409
Hi Shashank,Can you explain instead off trigger, DML Trigger and views..
Answer Question Select Best Answer
JUN
062006
01:58 PM
2736
Views
7
Ans
rajanipriya
askvenki
The force view can be created before base table is created .when the table is createdit is
automatically activated.we can create base table with any structure
Mohamed Irfan
o
Hi, Force views are created in real time environment as per the business needs because
of two specific reasons1. If the structure of the base table is not completely known (ie) ...
DEC
212005
02:55 AM
2780
Views
3
Ans
suneel
vinit
o
madhug56
Can you tell me something more about tk proof?? I mean how do we give input and what is
the output?
Answer Question Select Best Answer
312007
MAY
01:59 AM
852
Views
3
Ans
TEMP
column1
1
2
4
7
5
so in this table i want search missing number from 1 to 10.
so output should be
3
6
8
9.
how to get this o/p?">
santo
chakraborty_sarkar
SELECT LEV FROM (SELECT LEVEL LEV FROM dual CONNECT BY LEVEL < 10)
WHERE LEV NOT IN (SELECT COLUMN1 FROM TEMP);
Amit
o
082007
JUL
05:03 AM
1330
Views
0
Ans
ravindra
Answer Question
SEP
092004
06:04 AM
2249
Views
2
Ans
rudra pratap
o
In order to avoid mutation table error we need to have a row level as well as a statment
level trigger.
Sunil Yadav
o
To avoid the mutation table error ,the procedure should be declared as an AUTONOMOUS
TRANSACTION.By this the procedure will be treated as an separate identity.
Answer Question Select Best Answer
MAR
272007
02:51 PM
921
Views
1
Ans
ramya_adina
jamesravid
You can use SYSDATE oracle.lv_today := sysdate;or select sysdate into lv_today from
dual;both the statements assign sysdate to lv_today
Answer Question Select Best Answer
262007
MAY
06:34 AM
1348
Views
1
Ans
What is the difference between the internal table and table? What
is the difference between the cluster, pooled,& transparent?What
is the difference between the native & open sql?
o
rajendra
Meera
o
The internal table is a table which is getting filled during the run time of the program...and
after that there wont exist any value in that internal table whereas table is the one which
contains data permanently
Answer Question Select Best Answer
JAN
222007
01:28 AM
1342
Views
5
Ans
joe
visitor
o
If you do not want any executable statement within the begin-end block, you can include a
null statment.eg:begin null;end;
Chiranjit Dutta
o
We cant havedeclarebeginendwe must have something between the begin and the end
keywordsotherwise a compilation error will be raised.
Answer Question Select Best Answer
MAR
212006
01:11 AM
957
Views
3
Ans
umair_mughal
Chinmay
o
Yes,you can do by using like with orlike select * from tab1where col1 like '%back%' or col2
like '%back%'or col3 like '%back%'or col4 like '%back%'
RoulRaj
o
JAN
052006
08:59 AM
2348
Views
3
Ans
arunima
madhug56
Embedded SQL - SQL statements are invoked from a host environment like C/C++, Java
or any other programming languages.
Answer Question Select Best Answer
SEP
092004
06:04 AM
2681
Views
2
Ans
The Data dictionary tables/ Views where the characteristics of subprograms and Packages
are stored are mentioned belowa) USER_OBJECTS, ALL_OBJECTS, DBA_OBJECTSb)
USER_SOURCE, ALL_SOURCE, DBA_SOURCEc) USER_DEPENCENCIESd)
USER_ERRORS, ALL_ERRORS, DBA_ERRORS
vinod kumar
o
SEP
06:04 AM
092004
2227
Views
2
Ans
Procedure can be called in the following waysa) CALL <procedure name> direcb)
EXCECUTE <procedure name> from calling environmentc) <Procedure name> from other
procedures or functions...
M.KUMARAN
o
MAR
272007
02:20 AM
1498
Views
1
Ans
Samatha
gopichandv2002
o
012007
MAY
02:47 AM
932
Views
1
Ans
vardan
RoulRaj
o
There should be atleast one statement in between Begin and End.The Statement may be
Null statement also.Syntax:declarebeginnull;end;RegardsR.K.Roul
JUN
012006
11:05 AM
4418
Views
2
Ans
Rampeasad K
RoulRaj
o
Dear Rajeswaran,Please give one example(application ) where one can use force
view.Thanks & regards
Rajeshwaran
o
usually the views are created from the basetable if only the basetable exists.The purpose of
FORCE keyword is to create a view if the underlying base table doesnot exists.ex : create or
replace FORCE ...
Answer Question Select Best Answer
APR
112007
02:38 AM
1466
Views
1
Ans
Ramkumar Singh
Rule Based Optimization is an older technique which is used for optimization of queries but
follows a fixed rule or strategy for achieving the same. But in contrast cost Based
Optimization is a later ...
Answer Question Select Best Answer
MAR
192007
01:46 AM
2847
Views
1
Ans
ily_saravanan
Hi, can any body give me the sample program for avoiding the mutating error. we can avoid the mutating
through the statement level trigger instead of using the statement leve trigger, i need one sample program
to avoid the mutating error by using pl/sql table.Thanks Saravanan.P
KiranKW
A mutating error comes when u r trying to do some DML operation on a table that owns the
trigger.... there are a lot of options to avoid mutation .. eg, Making it autonomous
transaction...
Answer Question Select Best Answer
JAN
232007
08:06 AM
1052
Views
1
Ans
lalit4untl
Hi all I wrote a procedure to send email via plsql procedure, It was compiled successfully but not
working ....
here is the code (actuly i added the dbms output like step1 ,step 2 to see in which step the control is
going on )
PL/SQLcreate or replace PROCEDURE send_test_message
IS
mailhost VARCHAR2(64) := 'mail.cmcltd.com';
sender VARCHAR2(64) := 'akash.sharma@cmcltd.com';<br...< p=""></br...<>
KiranKW
Hi, I dont see any problem with your code ... try to capture the return code for each of the
calls ... that will help to identify the exact problem
Answer Question Select Best Answer
APR
102007
06:11 AM
3787
Views
1
Ans
A.Jyothsna
ramnath123
Code + decode
Code
o
code
decode
2.
manali
mohan
Yes We can use commit statement in triggers with 10G.Here is example :CREATE OR
REPLACE TRIGGER t_trigger AFTER INSERT ON t1 FOR EACH ROW DECLARE
PRAGMA AUTONOMOUS_TRANSA...
Answer Question Select Best Answer
3. MAR
222007
03:19 AM
2222
Views
3
Ans
Pavan
Suppose if i have 8 triggers declared for a table..how to disable a single trigger from a table...i don't want
to disable all triggers for a table. I know we can disable all triggers by using "alter table disable all
triggers;". just i want to know how to disable single trigger from a table.
Pavan
o
4. MAR
012007
02:28 PM
1196
Views
2
Ans
ddkdhar
subbaraovangalli
by using
show_errors we can see the errors in the prev created procedure.
dbms_output.put_li...
deep_paudel
DBMS_OUTPUT.put_line
Answer Question Select Best Answer
5. MAR
192007
01:43 AM
1277
Views
1
Ans
ily_saravanan
Hi,1. Iam looking for sample program for ref cursor. ref cursor can be associated with many select
statements and we can use the ref cursor to return the multiplevalue from the procedure or function.
how to use the ref cursor in a program to associate with many select statements.2. we can't use the
%rowtype attribut to return the multiple from the procedure or function instead of ref cursor. if we...
krishnamohan_geek
Hi,Let me answer your second questin first. Why ref cursor instead of %ROWTYPE.
%ROWTYPE is used for fetches record/row of a single table.OR in case of columns of
different tables then you have to crea...
Answer Question Select Best Answer
6. MAR
212007
07:54 PM
2581
Views
2
Ans
madhug56
Nikhil_4_Oracle
o Mar 23rd, 2007
We can use DDL commands in Procedure & Functions through "EXECUTE IMMEDIATE "
Command
Answer Question Select Best Answer
7. JAN
07:35 AM
162007
975
Views
2
Ans
Vikas Somwani
IT can only be possible through the collections.... go through the chapater NO 12 PL/SQL
O'reiilly Publications.
ram
o
8. DEC
142006
05:22 AM
1483
Views
1
Ans
SAGAR
Instrument
A nested loop is a loop within a lop, an inner loop within the body of an outer one. How this
workds is that the first pass of the outer loop triggers the innter which executes to
completion. Then the...
Answer Question Select Best Answer
9. JAN
312007
06:19 AM
1053
Views
6
Ans
globalanil18
Nikhil_4_Oracle
o Mar 12th, 2007
Hey,Above Soln is not working with tables where data is like,COL1 ----------1511 *708111
*5511 *78--Here 11 Repeats 3 times fine...--Check d rowidselect rowid,col1 from
nodup;ROWID ...
suni123
Hi,To delete duplicate rows from table EMPDELETE FROM EMP WHERE ROWID NOT
IN
(SELECT MAX(ROW...
292006
10. MAY
01:33 AM
1301
Views
2
Ans
baskaranprasad
BASAVARAJ KOLUR
o Mar 8th, 2007
11. JUN
282006
01:20 AM
866
Views
8
Ans
kamalnayan.M
ravikumarzee@gmail.com
12. SEP
152006
01:55 PM
1712
Views
6
Ans
smita
madhaviguthula
Hi Hemant, Please go through the following code for better understanding.First, create and
populate a test table with a concatenated index.CREATE TABLE test_objects ASSELECT *
FROM all_objects;CREATE...
hemant.agarwal03
o Mar 8th, 2007
13. MAR
072007
09:29 AM
2579
Views
1
Ans
skdash78
ahamed79
14. MAR
012007
02:23 PM
1402
Views
2
Ans
ddkdhar
ddkdhar
Hi ddkdhar,Can you please explain bit more what you are requirement
is?In such a case only NO_DATA_FOUND, or INVALID_NUMBER Exceptions are
encountered,well you can always say that,When Others Then Print sqlcode ,
sqlerrm....Thanks,Nikhil
15. MAR
012007
02:24 PM
2308
Views
3
Ans
ddkdhar
ddkdhar
One thing nikhil handle sqlerrm with variables .that increases perfmance ok.
ddkdhar
16. FEB
152007
02:25 AM
1896
Views
1
Ans
rakheeviyyapu
Innila
LOB datatypes can be used to store blocks of unstructured data like graphic images,
audio, etc
video
212006
17. JUL
03:55 PM
3690
Views
2
Ans
rana
sunflower
DBMS_TRACE package can be used to keep track of the calls between the subprograms
and trace of execution by sub-program, procedures, functions or an exception. It gives a
large amount of trace da...
Jian Zhang
When you want to see the execute plan of a SQL statement, you need to use TRACE
function of Oracle .
Answer Question Select Best Answer
18. FEB
092007
08:58 PM
2074
Views
2
Ans
madhuk17
Vishakha
geetha24
To display the cursorOPEN v_cursor FOR SELECT ename, empno, deptno FROM emp
WHERE deptno = p_deptno ORDER BY ename;LOOP FETCH v_cursor INTO v_ename,
v_empno,...
Answer Question Select Best Answer
19. JAN
01:50 AM
302007
1936
Views
1
Ans
joseph
geetha24
There is no limitation on the number of Subprograms in the package, but there is a limitation
on the compiled file size in the database.
Answer Question Select Best Answer
20. DEC
252006
07:59 AM
1055
Views
2
Ans
Anuruddha SINGH
madhuk17
We can call a function from anonymous block as a part of sql statement written in that
block.eg: create or replace function fn_emp(v_empno in number)return varchar2
isbeginselect ename into v_ename fr...
rajnish123
hi,suppose a function add two number and you desire to call it from anonyms block.create
or replace function f_add(a in number,b in number) return number asc number;beginc:=
a+b;return (c);end;t...
Answer Question Select Best Answer
21. JAN
232007
05:37 PM
830
Views
2
Ans
Lisa
madhuk17
Hi,I think trigger is not called.The code in the trigger defines the action the database needs
to perform whenever some database manipulation (INSERT, UPDATE, DELETE) takes
place.I think maximum number of data strings that can be returned through
DBMS_OUTPUT is 255 bytes.
gchandra_sekar
Hi!) Trigger cannot be called as it automatically gets activated once u touch the table.2)
Prior 10g user SQL> set serveroutput on size 1000000 or if it is 10gORA10GR2> set
serveroutput on size unlimited
Answer Question Select Best Answer
Sort by:
Answers
|
Date
Jump to Page:
24
NOV
032006
11:22 PM
7914
Views
3
Ans
ily_saravanan
srini
o
Feb 6th, 2007
Actually explicit cursor refers only one work area in memory ,incase of ref cursor refers different
work areas in memory.
ranjeetapegu
Difference between Pl/sql tables and record is that in pl/sql tables we can store more than one row
whereas in record we store only one row.TYPE rec_emp is RECORD( ename varchar2(10), empn...
Answer Question
NOV
152006
12:01 PM
994
Views
2
Ans
row level,statement level,before,after,insert,update,delete 3*2*2 total 12 types.
and can i even mention instead of triggers,database trigger and schema triggers">
oradev
Sagar Sai
o
Feb 4th, 2007
Hi,There are 3 types of triggers available in the Database. They are 1.DML Triggers :- These are
again 12 types like .. Before INSERT,UPDATE,DELETE and After INSERT...
Pawan Ahuja
o
Dec 3rd, 2006
there are three types of triggers in pl/sql1.)DML triggers2.)instead of triggers3.)system event
triggersRegardsPawan Ahuja
Answer Question
JAN
172007
05:42 AM
1450
Views
1
Ans
Apan Motilal
o
Jan 19th, 2007
Cursor is basically a pointer as it's like a address of virtual memory which is being used storage
related to sql query & is made free after the values from this memory is being used.
Answer Question
FEB
082006
02:39 AM
6872
Views
5
Ans
chiranjeevi reddy
Guest
o
Jan 16th, 2007
A forward declaration looks like the package definition part but is inside the bode.e.g.procedure A
isbegin B;end A;procedure B isbegin null;end B;will not work, because during call to B B...
Donald H. Kirschman
o
Dec 27th, 2006
Scalar data types store one single element of data, as opposed to composite data types. This is not a
concept that is unique to Oracle PL/SQL; rather, it is common to any programming language.&n...
Answer Question
JAN
112007
04:34 AM
907
Views
1
Ans
GANESH
o
Jan 15th, 2007
hi...actually the IN parameters are the read only parameters hence we can't assign any value to them
but for out parameters its not true, as we can assign value to OUT parameters. so the procedur...
Answer Question
OCT
072006
05:48 AM
1692
Views
4
Ans
raju
sankari
o
Jan 9th, 2007
We can do as shown below... in the same way we can drop the table..
DECLARE
BEGIN
EXECUTE IMMEDIATE 'create table employee(empno number(3),ename varchar2(10))';
END;
gangadharam.p
o
Dec 26th, 2006
HI, table can be created by using either dbms_sql or EXECUTE_IMMEDIATE in procedure or
function.
Answer Question
OCT
242006
04:47 PM
963
Views
2
Ans
table is also there "phone" with phoneno as a field but table is empty.now i want the result into
table2.
got it, Right!
Let me know if u have any questions.
thanks.
dev
">
dev
gangadharam.p
o
Jan 6th, 2007
Hi, write a control file to dump the data from file to table using SQL*LOADER or use UTL_FILE
to do the same.
jamesravid
o
Dec 12th, 2006
Use "sql loader" to limport flat file data to database tables.
Answer Question
NOV
052006
01:04 AM
1118
Views
2
Ans
basukolur014
gangadharam.p
o
Jan 6th, 2007
hi, when u do so the view gets error and synonym becomes invalid. If u create a table again with
same name but with different cols the synonym will work but view wont.bcz view is the stored...
raghgu
o
Nov 16th, 2006
Hi friend, As per RDBMS rule we cannot have invalid synoym, but we can have a invalid view.
Answer Question
DEC
182006
10:33 AM
1247
Views
1
Ans
Example:
declare
cursor CSRtest is
select *
from emp
for update of lastname;
begin
for i in CSRtest loop
...do something
...call procfedure with "commit"
update emp set lastname = "..."
where current of CSRtest;
endloop;
Results in "ORA-01002: fetch out of sequence" because curser is closed after "Commit"
How to "save state of curser" ?
Any workaround?">
Stefan
gangadharam.p
o
Jan 5th, 2007
Hi, It is very good query u asked.The work around is, it is not advisable to use a COMMIT inside
the loop as it invalidates the cursor which is declared for update.If u want to use commit then d...
Answer Question
DEC
192006
07:36 PM
1123
Views
1
Ans
vasudev
Manikandan
o
Dec 24th, 2006
Use execute immediate to write DDL statements.but you should have create system previlege on the
schema.
Answer Question
AUG
172006
06:45 AM
4146
Views
6
Ans
RamaKrishna.Yerra,TCS,Hyd,9989018508
Ashwini
o
Dec 23rd, 2006
Cursor Variable RestrictionsCursor variables are subject to the following restrictions; Oracle may
remove some of these in future releases. Cursor variables cannot be declared in a package since
they ...
rashid
o
Sep 20th, 2006
hi friend cursor variable can't use with dynamic sql.cursor variable can't use with in package because
it is not having persistent state.nulls can't assinged to cursor variable.remote procedure can't accept
cursor variable
Answer Question
DEC
072006
05:30 PM
969
Views
2
Ans
Pattabiraman
Guest
o
Dec 12th, 2006
Actually your question is not clear. Do u want to change column name or values in the column?to
change a values it is quite simple.select replace('replace_underscores_with_spaces','_',' ') from dual;
Gupteshwar
o
Dec 9th, 2006
You can use REPLACE function in order to replace a digit or character in a
column.SELECT REPLACE(col1, '_', ' ') FROM table_1.This function can also be used to update
column's records.Try this function. Hope it would work.
Answer Question
OCT
152006
04:00 PM
2080
Views
1
Ans
inam
jamesravid
o
Dec 12th, 2006
There is no "update cascade" functionality in oracle. But you can develop your own code to achieve
this. The source code is also available in this
urlhttp://asktom.oracle.com/tkyte/update_cascade/index.html
Answer Question
282006
SEP
03:08 AM
1306
Views
3
Ans
How can I create a new table by using other two table's values.
o
Anish
rampratap409
o
Dec 9th, 2006
create table new_employeesas (select e.employee_id, e.first_name, e.last_name, d.department_name,
d.department_id,c.location_id, c.city from employees e, departments d, locations cwhere
e.department_id = d.department_idand d.location_id = c.location_id);
Shree
o
Oct 11th, 2006
Create table table_name as( select tab1.column1,tab1.column2,tab2.column3 from table_name
tab1,table_name2 tab2 where tab1.colum1=tab2.column4);
Answer Question
NOV
162006
03:12 PM
2483
Views
2
Ans
dev
Pawan Ahuja
o
Nov 23rd, 2006
1) Block_Processing Triggers, 2) Interface event triggers, 3) master/Detail Triggers, 4) navigational
Triggers, 5) Query_time triggers, 6) Transactional Triggers 7) Validational Triggers 8)
Message_handling Triggers 9)When_New_Instance Triggers
Answer Question
NOV
232006
04:12 AM
2263
Views
0
Ans
Divya
Answer Question
AUG
112006
03:07 PM
3118
Views
5
Ans
shavali
Raghavendra
o
Nov 19th, 2006
Alter table disable all trigger;
Brijesh Mishra
o
Oct 9th, 2006
SQL> Spool c:tempdisable_all_triggerSQL> Select 'ALTER TRIGGER '|| trigger_name ||' disable;'
from user_triggers;SQL> spool offafter that open file disable_all_trigger.lst and remove header part
and save file.SQL>@c:tempdisable_all_trigger.lst
Answer Question
JUL
262006
04:20 PM
1081
Views
4
Ans
Srinivas
prakash
o
Nov 15th, 2006
Hi,
I would suggest not to pass all the records to you next procedure. You should look to
redesign your next procedure so that it accepts one record and proce...
prasanna
o
hi friend
of course no need of sending 2lakh records but some records whatever i required
Answer Question
NOV
142006
04:36 AM
1270
Views
0
Ans
What is the syntax for ref cursor working with forms 6i?
o
PRIYABRATA ROY
Answer Question
OCT
172006
07:22 AM
1159
Views
1
Ans
jagannath kar
youranjani
o
Oct 26th, 2006
Hi.. We can change the elements of listitems at runtime with the help of Record Group
Answer Question
Sort by:
Answers
|
Date
Jump to Page:
25
092004
SEP
06:04 AM
2060
Views
1
Ans
FUNCTION name (argument list .....) Return datatype is local variable declarations
Begin
executable statements Exception
execution handlers End;
bavani
o
Oct 23rd, 2006
create or replace function function_name(formal parameters list with only IN mode) return
datatypeislocal variable declarationsbegin executable statments; return value ;end function_name;
Answer Question
FEB
092006
10:10 AM
1754
Views
4
Ans
Shweta_faqs
syed_ansar
o
Oct 18th, 2006
We can use Ref cursor as an IN OUT parameter .
Nantha
o
Apr 18th, 2006
Normal cursor is used to process more than one record in plsql.Refcusor is a type which is going to
hold set of records which can be sent out through the procedure or function out variables.
Answer Question
JUN
272006
05:43 AM
1474
Views
3
Ans
kameshakundy
o
Oct 14th, 2006
select text from user_sourcewhere name='procedure_name';
D. Madhu
o
Jun 29th, 2006
select * from user_objects where type='procedure' and name='function or procedure name'
Answer Question
022006
SEP
02:06 AM
1372
Views
2
Ans
akash638
rashid
o
Sep 20th, 2006
define is use for predefine variable its depends on user. You can use char or number
Sachin
o
CHAR
Answer Question
APR
152006
08:21 AM
1111
Views
2
Ans
deshaniprashant
developer
o
Sep 14th, 2006
Hi,for example u have a sequence called s1 and table as student theninsert into student
values(s1.nextval,field1,field2, ....);that's all
Divesh
o
Apr 23rd, 2006
U can directly use insert into < table_name> select .currval/nextval from dual.Please free to contact
me if any queries on dibansal@cisco.com
Answer Question
AUG
082006
01:01 AM
6747
Views
9
Ans
dineshchaini
Dinesh
o
Sep 9th, 2006
Dear Maria... I traied with the DBA previlage but... again the same prob.. proc created but table is
not thea... ok I tried u r proc and mail back to you...
tdas2004
o
Sep 7th, 2006
You are right Maria Antony, but the question is, why is it not possible to create the table thru the
procedure while you can create the sametable using create table SQL command.The answer is, to
creat...
Answer Question
AUG
202006
04:21 AM
961
Views
2
Ans
basukolur014
Sheetal
o
Aug 24th, 2006
Hi,Your program will delete all rows from the table. If you print output after fetch from the cursor it
will show all rows those where selected in the cursors.When the cursor was created u select...
Rama Krishna,Y
o
Aug 21st, 2006
Hi Friend!! If you want to use the entire tale data from table in PL/SQL programing block,you have
to store the entire data in a temp buffer variable .. to syntronize that operation Oracle supports ...
Answer Question
JUL
172006
11:21 AM
1889
Views
3
Ans
jay
gouthami kodangal
o
Aug 13th, 2006
by making use of sql%rowfound.
Shiv Mangal Rahi
o
Jul 25th, 2006
Hi,You could do the same as given under below for emp table.....CREATE OR REPLACE procedure
procasbegindeclarev_empno emp.empno%type;v_ename emp.ename%type;cursor c_emp isselect
empno,ename from emp;b...
Answer Question
JUN
02:03 AM
302006
3100
Views
5
Ans
Samuel
mariashylaja
o
Aug 12th, 2006
During bulk collect you can save the exception and then you can process the exception.Look at the
below given example:DECLARE TYPE NumList IS TABLE OF NUMBER; num_tab NumList :=
NumList(10,0,11,1...
mariashylaja
o
Aug 12th, 2006
DECLARE TYPE NumList IS TABLE OF NUMBER; num_tab NumList :=
NumList(10,0,11,12,30,0,20,199,2,0,9,1); errors NUMBER;BEGIN FORALL i IN
num_tab.FIRST..num_tab.LAST SAVE EXCEPTIONS DELETE *...
Answer Question
APR
242006
07:50 AM
1457
Views
4
Ans
Nitina
Rama Krishna
o
Aug 11th, 2006
Its Binary IntegerRamki,TCS,HYD9989018508
parleg
o
Jul 16th, 2006
Is it number or binary integer?
Answer Question
AUG
012006
06:13 AM
898
Views
1
Ans
chandu
o
Aug 9th, 2006
Hi Friend!
If you deal with better performance You have to refer REF CURSOR and its
more advantage and effecient of Exeqution.Thanks&RegdsRamki
Answer Question
292006
MAY
03:05 AM
1221
Views
1
Ans
navneet
Gupta
o
Aug 7th, 2006
A table function is a function that returns an entire set of rows, and can be queried directly from the
within a SQL statement, as if it were true database table. Whereas pipeline function is similar,...
Answer Question
JUL
292006
07:47 AM
2321
Views
2
Ans
sushanta K. Mishra
o
Aug 1st, 2006
Its depend upon the query. If the two queries are firing on the table it is not possible. If the queries
are firing on different different tables then it is possible.Thanks & RegardsMadhu D.
Manoj Kumar Verma
o
Aug 1st, 2006
As Distributed database system based on 2 phase commit,one query is independent of 2 nd query so
of course we can run.manoj
Answer Question
JUL
072006
07:29 PM
5694
Views
1
Ans
ana thomas
Lingaraj RH
o
Jul 12th, 2006
Internally the Oracle database supports two procedural languages, namely PL/SQL and Java. This
leads to questions like "Which of the two is the best?" and "Will Oracle ever desupport PL/SQL in
favour ...
Answer Question
JUN
192006
09:44 AM
1731
Views
1
Ans
for example
source date is 19980224
it should be in target
1998-02-24.23.59.59.999999">
I want to convert source Date format "CCYYMMD" to "CCYY-MMDD23.59.59.999999" in to the target for example source date is
19980224it should be in target 1998-02-24.23.59.59.999999
o
Sachin
praveen
o
Jul 3rd, 2006
Hi all,let first conver it into to_date and thenm to_char and then concate with .23.59.59.999999this
way to_char(to_date('column name','ccyymmd') ,'ccyy-mm-dd')||.28.59.59.9999999try for
thisregardspraveen
Answer Question
152006
MAY
02:36 AM
912
Views
1
Ans
ranjan
Murali Krishna
o
Jun 4th, 2006
hi ,U can use the PRAGMA Function.I.e Autonomous Function to come back to normal stage in
Mutating table.
Answer Question
MAR
072006
12:07 PM
1190
Views
1
Ans
How do you get the return values in pl/sql when u exec them be
sides assigning the values to Bind variables
o
srini
MANI
o
May 31st, 2006
send an inout parameter to pl/sql procedure
Answer Question
MAR
092006
08:19 AM
2183
Views
2
Ans
Shahid
krishna631
o
May 31st, 2006
Hai,To know weather the Trigger status is Active/Inactive,Refer to "all_objects" TableSelect * from
all_objects where object_type = 'TRIGGER' and Object_name='XXX'Krishna Mohan
mahi
o
Mar 16th, 2006
Hi,U can see the information in 'user_triggers' by giving the statement likeselect * from user_triggers
where trigger_name='xxx';Thanks
Answer Question
APR
162006
08:04 AM
1206
Views
1
Ans
Shankar
manoj bajaj
o
Apr 25th, 2006
Yes we can relate two tables from 2 diff usersE.g. if user A has table Ta and User B has Table Tb
and Table Tb is child table and needs foreign key on A.Ta then we need to grant "references" object
privillege to User B on table Ta.1
Answer Question
MAR
282006
02:03 AM
1300
Views
1
Ans
SADANAND
o
Apr 14th, 2006
First create a Trigger and with Procedure you insert records.The :new will take the new values. So
use Triggers in Procedures
Sort by:
Answers
|
Date
Jump to Page:
26
052005
SEP
07:13 PM
1882
Views
2
Ans
Data Concarency => Means that many users can access data at the same time.Data
Consistency => Means that each user sees a consistent view of the data, including visible
changes made by the user's own transactions and transactions of other users.
arvind kumar
o
Apr 12th, 2006
types of triggers
tm1966_muthu
o
Feb 17th, 2006
ConcurrencyHow well can multiple sessions access the same data simultaneously ConsistencyHow
consistent is the view of the data between and within multiple sessions, transactions or statements
Answer Question
FEB
11:00 AM
122006
1583
Views
1
Ans
richa
praveen.pinisetti
o
Apr 6th, 2006
After compiling procedures,functions and triggers(in new versions only),Those will be stored in the
form of p-code(after parsing) in SGA(System Global Area).The advantage of p-code is Since it wa...
Answer Question
MAR
182006
02:16 PM
1332
Views
1
Ans
In which system table i can found that how many cursors are
currently open in the database?
o
Amitava
o
Mar 27th, 2006
Hi,Use the V$OPEN_CURSOR view to know how many cursors are currently open in the
database.Guna Sagar Challa
Answer Question
292005
SEP
02:38 AM
1319
Views
2
Ans
pradeep_davis
Antony Gubert
o
Mar 6th, 2006
Definer Rights--------------A routine stored in the database by default, is executed with the definer
rights (owner of the routine), depending on the user who calls it. For example, table "...
Tez
o
Oct 9th, 2005
U can unerstand these if u hav an idea of DBA..... DBA is the one who has all the priveleges on the
database.....So if u are a user of the database........ and if u want to make some operations on t...
Answer Question
MAR
04:50 AM
022006
2347
Views
2
Ans
What is crosstab
o
sashikanth
Sourabh
o
Mar 4th, 2006
create table src_table(col1 varchar2(10),col2 varchar2(10),col3 varchar2(10),col4 varchar2(10),col5
varchar2(10));insert into src_table values ('A', 'B', 'C', null, null);insert into src_table values ...
KS
o
Mar 3rd, 2006
To create a result set where the rows need to be columns, or vice versa. You need to "pivot" rows into
columns, or vice versa. this is where you need to look at a pivot (or crosstab) query.
Answer Question
MAR
022006
09:14 AM
1600
Views
1
Ans
archana.nukala
Rajesh Ramanan
o
Mar 2nd, 2006
SELECT dbms_rowid.rowid_block_number(rowid)FROM bowie_stuff;SELECT
dbms_rowid.rowid_object(rowid)FROM bowie_stuff;
Answer Question
FEB
162006
10:34 AM
1410
Views
1
Ans
murthy
Navin
o
Mar 2nd, 2006
A ref cursor is a type that you can define in the declare section of your PL/SQL program. You can
then open this cursor for any SQL statement that you construct dynamically in your program.For
your ot...
Answer Question
FEB
092006
07:26 AM
1918
Views
1
Ans
Soma Bose
tm1966_muthu
o
Feb 17th, 2006
LogMiner is a powerful audit tool for Oracle databases, allowing administrators to easily locate
changes in the database, enabling sophisticated data analyses, and providing undo capabilities to
rollback logical data corruptions or user errors.
Answer Question
FEB
142006
12:44 AM
1074
Views
1
Ans
rashmi
ramkiibm.yerra
o
Aug 29th, 2007
Hai Rashmi Its not Similar. The First statement is only for Read-Only Trasactions that to be used in
PL/SQL Block. The Second one is for Isolation Levels like Read Uncommitted, Read Committed,
Repeatable Read, Serializable.RegdsRama Krisha.Yramakrishna . yerra @ in . ibm . com
Answer Question
JAN
312006
10:12 AM
2813
Views
1
Ans
Shweta_faqs
SANCHITA SARKAR
o
Feb 2nd, 2006
When a package is initialised that is called for the first time the entire package is loaded into SGA
and any variable declared in the package is initialises.
Answer Question
NOV
072005
03:06 AM
1870
Views
1
Ans
rajeevsingh
pankaj_gauba
o
Jan 11th, 2006
In reference cursor but we have option of giving the where clause in the body ,We cann't write cursor
without select statement.
Answer Question