Can a primary key have null values? If we try to insert a
null value in a primary key column, will it work or give an
error code?

Answer Posted / satya prasad n

The PRIMARY KEY cannot be null. you can insert ZERO into
that but should not be null. It will throw an error if you
try to inserts a NULL.

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is collection in db2 bind?

793


How do I create a view in db2?

808


What is a collection in db2?

791


Why select is not preferred in embedded sql programs?

966


How to rename a table in DB2 ?

837


Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?

7528


What are the various data types available in db2?

831


How can tablespace be moved to another dasd volume that is allocated for that tablespace?

994


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

871


Give the name of some fields form sqlca.

844


What is a buffer in memory?

816


What is db2? Explain.

808


What is performance tuning db2?

859


What is ibm db2 client?

707


Explain about cursor stability?

815