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
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 |
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 |
Answer / ratheesh
No. A SQLCODE of -803 (duplicate insert) will be returned.
| Is This Answer Correct ? | 0 Yes | 6 No |
What is db2 and what is the use of db2 optimizer?
What is precompiler in db2?
How Plan is created while executing the query using SPUFI?
How do you simulate the explain of an embedded sql statement in spufi/qmf?
What is reorg in DB2
What is a cursor?
What is runstats and reorg in db2?
I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LOCATION AND DEPT_TABLE CONTAINS DEPTNO,DOJ(DATE OF JOINING).I WANT TO DISPLAY NAME,DEPTNAME,DOJ AND WHO ARE JOINED BETWEN 01- JAN-2007 TO 01-JAN-2008?
EXPLAIN has output with MATCHCOLS = 0. What does it mean?
What is an inner join, and an outer join ?
How to execute stored procedures?
Q3. How will you fetch duplicate values from a DB2 table?