ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Databases  >>  SQL PLSQL
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
Can we use more than one null value for unique key?
 Question Submitted By :: Vamshi
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Can we use more than one null value for unique key?
Answer
# 1
no. because if we use more than one, it leads to  
duplicate, which effects the fundamental property of unique 
key.
 
Is This Answer Correct ?    17 Yes 18 No
Vamshi
 
  Re: Can we use more than one null value for unique key?
Answer
# 2
We can insert more than one null into table
 
Is This Answer Correct ?    23 Yes 4 No
Rao
 
 
 
  Re: Can we use more than one null value for unique key?
Answer
# 3
No, we can't use more than one null value for unique key. 
Unique means it doesn't accept duplicate values.
 
Is This Answer Correct ?    7 Yes 18 No
Pavani
 
  Re: Can we use more than one null value for unique key?
Answer
# 4
We can insert any number of null values in the column which 
contains the unique key
the reason is NULL is not equal to anothere NUll
so each null is different so there is no question of 
duplication
 
Is This Answer Correct ?    20 Yes 6 No
Anil Kumar Abbireddy
 
  Re: Can we use more than one null value for unique key?
Answer
# 5
If we use more than one, it leads to  
duplicate, which effects the fundamental property of unique 
key.

But......
We can insert any number of null values in the column which 
contains the unique key.
The reason is NULL is not equal to anothere NUll
so each null is different so there is no question of 
duplication
 
Is This Answer Correct ?    9 Yes 4 No
Talent Pool
 
  Re: Can we use more than one null value for unique key?
Answer
# 6
Yes,We should .That's the significance of Unique Key

If you insert data into Unique Key column it checks for the 
uniqueness of THIS NON NULL UNIQUE COLUMNAR DATA
 
Is This Answer Correct ?    2 Yes 8 No
Ramesh
 
  Re: Can we use more than one null value for unique key?
Answer
# 7
no, because duplicate value is not allowed in unique. so 
thats why we can enter only one null value.
 
Is This Answer Correct ?    2 Yes 10 No
Krishana Kumar Gupta
 
  Re: Can we use more than one null value for unique key?
Answer
# 8
Unique in similar to primary key  but one difference's
primary key  duplicate records not allow and not null value
and uniquie allow one null value and duplicate records
 
Is This Answer Correct ?    0 Yes 9 No
Ashwani Kumar(kannouj)
 
  Re: Can we use more than one null value for unique key?
Answer
# 9
Yes , More than one field can be NULL in a unique Key 
column. Because a Null values is not equal to another null 
value. So, no duplicate value is there.
 
Is This Answer Correct ?    9 Yes 3 No
Debdut Bhaumik
 
  Re: Can we use more than one null value for unique key?
Answer
# 10
yes,we can use more than one null value for unique key.
Bcz all null values are unique,
thing is that null is unknown ,unassignable, 
undefind ,inapplicable value and allwase null is not equal 
to null and any arithimitic operation and logical 
comparision all wase result null
 
Is This Answer Correct ?    5 Yes 4 No
Rajesh
 
  Re: Can we use more than one null value for unique key?
Answer
# 11
no because primary key is the unique value of the table that
can not allow null&duplicate value.
so it is not possiblity use more than one null value and
duplicate valu
 
Is This Answer Correct ?    1 Yes 5 No
Iftekharul Haque
 
  Re: Can we use more than one null value for unique key?
Answer
# 12
Yes, We can insert more the one NULL with unique key.
cos, Neither null is equal to null Nor null is not equal to
null.
 
Is This Answer Correct ?    2 Yes 3 No
Shailendra Chauhan
 
  Re: Can we use more than one null value for unique key?
Answer
# 13
No, we cannot use more than one null value in unique key.
This is the major difference between primary key and unique 
key.

Primary key cannot contain null values

Whereas unique key can contain only one null value
 
Is This Answer Correct ?    1 Yes 4 No
Guest
 
  Re: Can we use more than one null value for unique key?
Answer
# 14
Yes ,we can insert more null value in a table having unique 
key,Bcoz one null vale is different frm another null value.
 
Is This Answer Correct ?    1 Yes 3 No
Sam
 
  Re: Can we use more than one null value for unique key?
Answer
# 15
Fundamental principle is 2 nulls are not unique. U can 
insert N number of nulls in a unique its CONCRETE
 
Is This Answer Correct ?    2 Yes 1 No
Kalyana Chakravarthy
 
  Re: Can we use more than one null value for unique key?
Answer
# 16
Yes we can..
Hey guys.. don't be confused with the values and nulls. 
Unique key conforms only the values to be unique. Since the 
nulls are not any kind of value, they can occur as many 
times as they can.. nulls are nothing..
 
Is This Answer Correct ?    2 Yes 2 No
Ravin
 
  Re: Can we use more than one null value for unique key?
Answer
# 17
The answer to this question depends on the database that we 
are using
1. In SQL Server and DB2, we can insert only one null value 
in the Unique Key column.
2. In Oracle, we can insert multiple null values
 
Is This Answer Correct ?    13 Yes 0 No
Slimtech
 
  Re: Can we use more than one null value for unique key?
Answer
# 18
Yes, we can use multiple Null values in case of Unique Key 
Column. This is one the main difference between Unique Key 
and Primary Key that Unique Key always allows multiple 
entries of Null Statement where as Primary Key never allows 
this.

I am hereby giving you a very very basic example which 
suggests that Unique Key can have more than one Null 
Statement :- 

SQL> create table abcd(name varchar2(10) unique);

Table created.

**********************

Now insert the values :-

SQL> insert into abcd(name)values('amit');

1 row created.

SQL> insert into abcd(name)values('ami');

1 row created.

SQL> insert into abcd(name)values(null);

1 row created.

SQL> insert into abcd(name)values(null);

1 row created.

SQL> insert into abcd(name)values(null);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from abcd;

NAME
----------
amit
ami



Here blank space above represents the entries of null 
statements..!!
 
Is This Answer Correct ?    0 Yes 0 No
Amit Rajoria
 

 
 
 
Other SQL PLSQL Interview Questions
 
  Question Asked @ Answers
 
How to maintain the history of code changes of pl/sql?  2
Regarding joins what are the differences you observed in oracle 9i and sql server? Choice-Solutions3
What are the blocks in stored procedure? Microsoft3
I need a exceptoin in pl/sql block so that if any errors occur in the block then no exception should errors should raise?  1
How toimport .dmp file in lower version of oracle from higher version ? TCS2
what is meant by forward declaration in functions?  3
what is global variable in pl/sql  1
Please let me know if UNION ALL and Natural Join does the same operation and are same... iGate3
What are the new features in Oracle 10g. Compared to Oracle 9i? Polaris1
Hello All, Could any well write a query for the following scenario. Account(table name) No Name Amount 1 ABCD 2000.00 2 DEFG -2000.00 3 GHIJ 3000.50 4 JKLM 4000.00 5 MNOP 6000.00 O/p Should be in this format No Name Credit Debit 1 ABCD 2000.00 0 2 DEFG 0 -2000.00 3 GHIJ 3000.50 4 JKLM 0 -4000.00 5 MNOP 6000.00 o could any one give appropriate query for this Thnks in Advance Suneel Reddy Target4
in materialized view the structure will create immediately or not? iFlex2
can we create index on index? iFlex4
what is global variable in package  2
How many LONG columns are allowed in a table?  3
what is the forward decleration in packages?  1
What is Referential Integrity? IBM2
What is difference between TRUNCATE & DELETE? TCS12
What is clustered and non-clustered indexes? Microsoft3
diff b/w function and procedure? iFlex7
When the mutating error will comes? and how it will be resolved?  2
 
For more SQL PLSQL Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com