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

What is correlation names?

1 Answers  


One program calling 5 subprograms, its a cobol db2 program, after precompilation how many plans and packages will created?

3 Answers  


What is db2 instance?

0 Answers  


Is it Possible to read from PS file and write it to database by using dynamic sql(execute immediate)

2 Answers  


wht displays the number of times a query modified ?

2 Answers   TCS,






What is the maximum No of rows per page?

0 Answers   IBM,


How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to increase the letters from 7 to 12 for user id.How we can do it?

6 Answers   Wipro,


Shall i use this query to retrieve first 4 records, Select empno, sal from emptbl where empno < 5. like this can we fetch first 100 records?

3 Answers  


What is meant by dclgen?

0 Answers  


if suppose i am having an ACCOUNT table with 3 coloumns ACC. NO,ACC. NAME,ACC. AMOUNT . If a unique index is also defined on ACC.NO and ACC.NAME then write a query to retrieve account holders records who have more than 1 ACC.

8 Answers   Wipro,


What is performance tuning db2?

0 Answers  


Can one database have multiple instances?

0 Answers  


Categories