Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we use more than one null value for unique key?

Answer Posted / mukesh

Ques:= Can we use more than one null value for unique key?
Ans:=Yes, we can use multiple Null values in case of Unique Key
Column.

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

Table created.

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

1 row created.

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

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> insert into abcd(name)values('');

1 row created.

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

1 row created.

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

1 row created.

SQL> select * from abcd order by name desc;

NAME
----------






amit
MKS

8 rows selected.

Note:= Here blank space above represents the entries of null
statements..!!

SQL> select nvl(name,0) from abcd;

NVL(NAME,0
----------
amit
MKS
0
0
0
0
0
0

8 rows selected.

SQL> select nvl(name,'a') from abcd;

NVL(NAME,'
----------
amit
MKS
a
a
a
a
a
a

8 rows selected.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the reports view in oracle sql developer?

928


What is the difference between sql, mysql and sql server?

1017


What packages are available to pl/sql developers?

996


Why is partition used in sql?

1051


How to assign sql query results to pl sql variables?

996


Can we insert data into view?

852


What are records give examples?

955


Can you have more than one trigger on a table?

945


What is sqlca in db2?

900


Who is the owner of mysql database?

1003


Is crud a cuss word?

978


What does the base_object_type column shows in the user.triggers data dictionary view?

1000


What is the difference between nvl function, ifnull function, and isnull function?

1052


What is the difference between syntax error and runtime error?

1069


How do I truncate a sql log file?

1009