Vous êtes sur la page 1sur 3

SUBITHA

1.How would you determine who has added a row to a table?

By implementing an INSERT trigger for logging details during each INSERT operation on
the table.

2.How do you set the number of lines on a page of output? The width

The SET command in SQLPLUS is used to control the number of lines generated per page
and the width of those lines, for example SET PAGESIZE 60 LINESIZE 80 will generate
reports that are 60 lines long with a line width of 80 characters. The PAGESIZE and
LINESIZE options can be shortened to PAGES and LINES.

3.How do you prevent output from coming to the screen

The SET option TERMOUT controls output to the screen. Setting TERMOUT OFF turns off
screen output. This option can be shortened to TERM.

4.How do you prevent Oracle from giving you informational messages during and after a
SQL
statement execution

The SET options FEEDBACK and VERIFY can be set to OFF.

5.Which datatype is used for storing graphics and images

LONG RAW data type is used for storing BLOB's (binary large objects).

6.Which is more faster - IN or EXISTS

EXISTS is more faster than IN because EXISTS returns a Boolean value whereas IN returns
a value.

7.Display the number value in Words?

SQL> select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp;

the output like,

SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP'))

--------- ----------------------------------------

800 eight hundred

1600 one thousand six hundred

1250 one thousand two hundred fifty


8.Explain three different rules that apply to NULLs when doing comparisons?

For all operators except for concatenation (||), if a value in an expression is a NULL, that
expression evaluates to NULL

NULL is never equal or not equal to another value


NULL is never TRUE or FALSE

9.Will you be able to store pictures in the database?

Yes, pictures can be stored in the database using Long Raw Data type.
This datatype is used to store binary data for 2 gigabytes of length.
However, the table can have only one Long Raw data type.

10.What is SQL*Plus?

SQL*Plus is an application that recognizes & executes SQL commands & specialized
SQL*Plus commands that can customize reports, provide help & edit facility & maintain
system variables.

SHALINI
1.What is TTITLE & BTITLE?

TTITLE & BTITLE are commands to control report headings & footers.

2.What is SET command?

SET command changes the system variables affecting the report environment.

3.What is Locking?

Locking are mechanisms intended to prevent destructive interaction between users accessing
data.

4.Explain SQL*Loader

SQL*Loader is a product for moving data in external files into tables in an Oracle database.
To load data from external files into an Oracle database, two types of input must be provided
to SQL*Loader : the data itself and the control file.
The control file describes the data to be loaded. It describes the Names and format of the data
files, Specifications for loading data and the Data to be loaded (optional). Invoking the loader
sqlload username/password controlfilename <options>.

5.Difference between NO DATA FOUND and %NOTFOUND?

NO DATA FOUND is an exception raised only for the SELECT....INTO statements when the
where clause of the query does not match any rows.
When the where clause of the explicit cursor does not match any rows the %NOTFOUND
attribute is set to TRUE instead.

6.What Is the Order of Defining Local Variables and Sub Procedures/Functions?

In the declaration part, you must define all local variables before defining any sub procedures
or sub functions.

7.What Are Named Parameters?

Named parameters are actual parameters specified not by position but by providing formal
parameter names when calling the procedure or function. The main advantage of named
parameters is that the caller don't have to remember the position of each parameter. But the
caller have to remember the formal parameter names.

8. delete employee who are not mapped to department.?


Delete from employee where dept_no=null;

9.display emp details getting max of salary dept wise?


Select*from emp where dept_no,salary in(select dept_no,max(salary)from emp groip by
dept_no);

10. What is the use of CASCADE CONSTRAINTS?

When this clause is used with the DROP command, a parent table can be dropped even when
a child table exists

Vous aimerez peut-être aussi