Can a unique index have more than one null value? If not,
what error code is given if an attempt is made to insert
more than one null value?

Answers were Sorted based on User's Feedback



Can a unique index have more than one null value? If not, what error code is given if an attempt i..

Answer / mani

Unique index can have null values and no null value is equal
to another null value.

i don't know if it raises an error or not when you insert a
null value.
Null value acceptance in the column is again based on the
definition given for the column whether it can accept null
values or not.

Is This Answer Correct ?    5 Yes 2 No

Can a unique index have more than one null value? If not, what error code is given if an attempt i..

Answer / sri

Null value will allow only one null (That is maximum) as
per DB2 stds. If we try to insert more we get error -305.

Is This Answer Correct ?    2 Yes 5 No

Can a unique index have more than one null value? If not, what error code is given if an attempt i..

Answer / ratheesh

No. A SQLCODE of -803 (duplicate insert) will be returned.

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More DB2 Interview Questions

Which components manage deadlocks in db2?

1 Answers  


Following a db2 update statement, what is the quickest way to compute the total number of updated rows?

1 Answers  


Where could you look if you had a question about whether a column has been defined as an index?

2 Answers  


Is db2 a mainframe?

1 Answers  


i want to know how the commit option works,how it save the changes? it will update the database or what ? where we can see these saved changes?

4 Answers  


What are the various locks available?

5 Answers   CTS,


I am having n number of records in a table which consists of emp-name is one of the field among them. Now i want to change the first letter of every name with capital.

1 Answers   Cap Gemini,


Is ibm db2 open source?

1 Answers  


The only place of VSAM KSDS in DB2 is?

2 Answers   IBM,


Can All Users Have The Privilege To Use The SQL Statement Select (DML)?

1 Answers  


What os does db2 run on?

1 Answers  


What is check constraint. Explain with example.

1 Answers  


Categories