Академический Документы
Профессиональный Документы
Культура Документы
Answer
#1
function must return value whereas procedure may or
maynot
return value
Call to Function can be encounter by using select
statement where as procedure can not be call in
select
statement
Re: diff b/w function and procedure? Answer
#2
A procedure a subprogram used to perform a specific
action
whereas a function is a subprogram which is used to
compute
a value,in procedure we can use
parameters(IN,OUT,IN OUT)
but in function we cant
Re: State the difference between implict and explict cursor's? Answer
#2
The implicit cursor is used to process INSERT,
UPDATE,
DELETE, and SELECT INTO statements. During the
processing of
an implicit cursor,Oracle automatically performs
the OPEN,
FETCH, and CLOSE operations.
Re: State the difference between implict and explict cursor's? Answer
#3
IMPLICT CURSOR:- Automatically porvide by oracle
which
perform DML statements. queries returns only one
row.
Re: State the difference between implict and explict cursor's? Answer
#4
Explicit Cursor:-We are not able to Handle
NO_DATA_FOUND
Exception.
Answer Posted
Question What is Distributed database ? Rank
By
Question Submitted By :: Guest
I also faced this Question!! © ALL Interview .com
Answer A distributed database is a network
of databases
managed by multiple database servers
that appears to a
user as single logical database. The data
of all
databases in the distributed database
can be simultaneously
accessed and modified.
Question What is cursor and where do you use them? Answer Posted
Rank
By
Question Submitted By :: Mihir
This Interview Question Asked @ eBay
© ALL
I also faced this Question!! Interview .
com
Answer cursor is temperory block of memory which holds the 0 Guest
data as
temperory in buffer
Ques
Distributed database is a database located at different places
and include data from common operational and user
database and also from data generated and used only at the
user's site.
A distributed database is a network of databases managed
by multiple database servers that appears to a user as single
logical database. The data of all databases in the distributed
database can be simultaneously accessed and modified.
Re: what are the differences you find when working with
oracle 91 and sql server 2005?
Answer There are so many Difference 0 Daid
#1 in oracle 9i and Sql Kumar
Server2005
some example are as follows:
in Oracle
In sqlserver2005
-----------------------
--------------------------
1.Schema
Database
2.Block
Pages
3.Segment
N/A
4.Clusters
N/A
5.Index(Type)
Only One Type is Present
6.Materialized Views
N/A
7.Operators
N/A
8.Packages
N/A
9.Hierarchical Operators
N/A
10. In case of partition
table in oracle we have
Three
option and easely
implemented but in Sqlserver
It is complx
work
Etc.........................
Re: how to display last 5 letters from a name (take emp table
ename )
Answer select right(ename,5)
# 1 as name from emp
Re: It's Urgent? How to IMPORT .xls & .txt file into ORACLE?
Answer open the TOAD and run
# 1 the QUERY by using the
SELECT
statement. after that
click the right button
and select the
SAVE AS button, in
that select .xls Radio
button and enter
the file name
automatically data
store in that file
Re: Anybody can tell me, how do we find second largest emp
salary from emp table.. Thanks in advance ...
Answer select max(sal) from emp
# 1 where sal < (select max(sal)
from
emp)
For example:-
If you enter n=1,it will
display first highest salary
if you enter n=2,it will
display second highest salary
......
Example
CREATE BITMAP JOIN INDEX <index_name>
ON <table_name> (<table_name.column_name>)
FROM <table_name, table_name>
WHERE <join_condition>
SQL Statement 1
UNION
SQL Statement 2
Employees_Norway:
E_ID E_Name
01 Hansen, Ola
02 Svendson, Tove
03 Svendson, Stephen
04 Pettersen, Kari
Employees_USA:
E_ID E_Name
01 Turner, Sally
02 Kent, Clark
03 Svendson, Stephen
04 Scott, Stephen
-------------------------------------
-----------------------
--------------------
Result
E_Name
Hansen, Ola
Svendson, Tove
Svendson, Stephen
Pettersen, Kari
Turner, Sally
Kent, Clark
Scott, Stephen
UNION ALL
The UNION ALL command is equal to the
UNION command, except
that UNION ALL selects all values.
SQL Statement 1
UNION ALL
SQL Statement 2
-------------------------------------
-----------------------
--------------------
Result
E_Name
Hansen, Ola
Svendson, Tove
Svendson, Stephen
Pettersen, Kari
Turner, Sally
Kent, Clark
Svendson, Stephen
Scott, Stephen
Re: what is the difference between UNION AND UNIONALL
Answer UNION provides only distinct values
# 2 as output whereas UNION
ALL provides all values.
So UNION ALL seems to be faster than
UNION.
Re: ex. one table is having 1 column with 10 records , then how to
display all the values in row wise ?
Answer it will need a cursor. 0 Ruchi
#1 Varma
begin
for cur1 in (select a from Name) loop
dbms_output.put(cur1.a);
end loop;
end;
Re: ex. one table is having 1 column with 10 records , then how to
display all the values in row wise ?
Answer create table x (col1 number(4));
# 2 insert into x value(1);
....
...
insert into x value(10); /* upto 10 rows
then
select
substr(max(decode(rownum,1,col1,0)),1,2),
substr(max(decode(rownum,2,col1,0)),1,2),
substr(max(decode(rownum,3,col1,0)),1,2),
substr(max(decode(rownum,4,col1,0)),1,2),
substr(max(decode(rownum,5,col1,0)),1,2),
substr(max(decode(rownum,6,col1,0)),1,2),
substr(max(decode(rownum,7,col1,0)),1,2),
substr(max(decode(rownum,8,col1,0)),1,2),
substr(max(decode(rownum,9,col1,0)),1,2),
substr(max(decode(rownum,10,col1,0)),1,2)
from x
C1 C2
---------- ----------
1 10
2 10
3 10
4 10
5 10
6 10
7 10
8 10
9 10
10 10
10 rows selected.
10 rows deleted.
SQL> commit;
C1 C2
---------- ----------
1 2
Sample Table is
ENAME ENO
100
merge t1
using (select * t1) t2
on (t1.col1=t2.col1)
when matched then
update set col2='value'
when not matched then
insert into (col1, col2) values ('val1',
'val2');
1) In relational database design, the process of organizing data to minimize
redundancy. Normalization usually involves dividing a database into two or
more tables and defining relationships between the tables. The objective is to
isolate data so that additions, deletions, and modifications of a field can be
made in just one table and then propagated through the rest of the database
via the defined relationships.
There are three main normal forms, each with increasing levels of
normalization:
First Normal Form (1NF): Each field in a table contains
different information. For example, in an employee list, each table
would contain only one birthdate field.
Second Normal Form (2NF): Each field in a table that is not a
determiner of the contents of another field must itself be a function of
the other fields in the table.
Third Normal Form (3NF): No duplicate information is
permitted. So, for example, if two tables both require a birthdate field,
the birthdate information would be separated into a separate table, and
the two other tables would then access the birthdate information via
an index field in the birthdate table. Any change to a birthdate would
automatically be reflect in all tables that link to the birthdate table.
There are additional normalization levels, such as Boyce Codd Normal Form
(BCNF), fourth normal form (4NF) and fifth normal form (5NF). While
normalization makes databases more efficient to maintain, they can also
make them more complex because data is separated into so many different
tables.
(2) In data
Re: Who i will insert 1 lacks record in a Database table
Answer The qs is not quite 0 Milan
# 1 clear....
good question.......
http://www.oracle.com/technology/pub/articles/10gdba/index.html
http://www.oracle.qassociates.co.uk/oracle-10g-features.htm
Re: what is the output of select * from emp where null=null & select * from
emp where 1=1
Answer select * from emp where null=null: 2 Anitha
# 1 will not return any rows
in the table since two null values
are not always same.
Re: how to truncate date and get only time part 9:20:00
Answer select <column_name>,to_char 0 Saisivakumar
# 1 (<column_name>,'fmdd month [Kesdee]
yyyy fmhh:MI:ss am') from
<table_name> where
condition;
Note: i have given for both date
and time, pls use as u
want.
Re: what is primary key and foreign key when and where have to use
Answer primary key has a unique & it is 0 Prashant
# 1 only one in a
databasewhile fkey is not unique. it
is based on primary key
HI
bye
Re: Explain 1st, 2nd, 3rd normalization form of data base
Answer 1st normal form: first
# 2 identify the repeating
group of
fields n group them into
separate table
2nd normal: it should be in
1st normal form and check
all
fields are dependent on
primary key
3nd normal form: it should
be in 2nd normal form and
check
all the fields r independent
of any other non-key
attribute
ie removes the fields that
dependent on non-key
columns)
Re: What is Index and different types of Indexes?
Answer Index is used to fetch the
# 2 data in a reliable and fast
manner and the types of index
avalilable are clustered
index and non clustered index.
Answer
#2
Re: what is the difference between primary key & foreign key?
Answer
#3
Primary key is unique
primary key is not NULL and
Guest
Re: what is the difference between primary key & foreign key?
Answer
#4
Primary Key is unique Key entire the table and
which is
also NOT NULL
where as foriegn key is the null & which
references the
primary key .
0
Muneer
Re: what is the difference between primary key & foreign key?
Answer
#5
primary key is the parent and foreign is the child.
0
Guest
Answer
#2
Re: what is the difference between primary key & foreign key?
Answer
#6
primary key is used to identify a row and it
doesnot allow
null values. It avoids duplication of rows.
0
Guest
Re: what is the difference between primary key & foreign key?
Answer
#7
In the context of relational databases, a foreign
key is a
referential constraint between two tables.[1] The
foreign
key identifies a column or a set of columns in one
(referencing) table that refers to a column or set
of
columns in another (referenced) table. The columns
in the
referencing table must form a primary key or unique
key.
Answer
#2
0
Raghu
Re: what is the difference between primary key & foreign key?
Answer
#8
Basic difference betweeen Primary key and foreign
key is :
0
Shaik Gouse Peer
Re: what is the difference between primary key & foreign key?
Answer
#9
primary key is used to identify a row and it
doesnot allow
null values. It avoids duplication of rows.
Answer
#2
0
Hardik Patel
Re: what is the difference between primary key & foreign key?
Answer
# 10
Primary key is used to identify a row in a table
and it
doesnot allow null values. It avoids duplication of
rows.
0
Gaurav , Ashish ,preeti , Main
Re: what is the difference between primary key & foreign key?
Answer
# 11
Answer
#2
0
Shree
Re: what is the difference between primary key & foreign key?
Answer
# 12
primary key is a keyword .that refers to the
unique value
in the particular record.it cant have null
0
Simbu
Re: what is the difference between primary key & foreign key?
Answer
Answer
#2
# 13
foregin key reference a primary key in another
table
0
Raji
Re: what is the difference between primary key & foreign key?
Answer
# 14
primary key does not allow duplicate and null
values
but foreign key allows null values it refers
primary key
0
Harish
Answer
#2
In a database environment
this will often happen
because
of not issuing proper row
lock commands. Poor design
of
front-end application may
cause this situation and the
performance of server will
reduce drastically.
4. DSN is created.