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 are the commands used in sql?

1079


what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba

1004


Who is the owner of mysql database?

1057


Is sql harder than python?

1102


What is a pl/sql block?

1225


Does group by remove duplicates?

1039


name 3 ways to get an accurate count of the number of records in a table? : Sql dba

1067


Why we use stored procedure instead of query?

997


How does an execution block start and end in pl sql?

950


what is foreign key? : Sql dba

1044


Can sql function call stored procedure?

1021


What is embedded sql in db2?

1017


What is cross join sql?

917


Can triggers stop a dml statement from executing on a table?

1092


What is the basic form of sql query?

943