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 query_cache_limit?

541


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

10729


What is image copy in db2?

564


What is a trigger in the db2 database?

590


What is precompiler in db2?

582






Which component is responsible for processing sql statements and selecting access paths?

652


What is table space in db2?

572


What is dclgen in db2?

669


Which command is used to remove all rows from a table?

546


Define db2 and its databases?

616


What is with ur in db2?

747


What is page size in db2?

559


What is a bind in db2?

587


List down the data types in the db2 database.

628


What are the contents of dclgen?

647