Is it possible to update a primary key value? If not, what
is the error code given? If yes, can more than 1 primary
key column be updated at a time?
Answers were Sorted based on User's Feedback
Answer / guest
Primary key value can be updated as well provided the value
you update it with identifies it uniquely.
| Is This Answer Correct ? | 28 Yes | 4 No |
Answer / keshireddy
further, multiple primary keys can be updated at time. Only
condition is that value should be unquie. else sql code -803
| Is This Answer Correct ? | 18 Yes | 0 No |
Answer / guest
Ans 3 is correct. If the key already present, while
updating it will show the sql code as = -803.
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / guest
also remember, you cannot update a primary key when it has
matching foreign key values.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / haribabu
yes, it is possible, move 'value' to ws-eno. Here ws-eno is
primary-key.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / deepak
First u will need to drop the index and then make the
required changes to PK and later again create the
index,Make sure u have all the conditing to for PK fine.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / priya
If a primary key column cannot be updated, what is the
error code given when an attempt is made to update it
through a SQL query in a COBOL program?
| Is This Answer Correct ? | 3 Yes | 5 No |
How do I optimize a query in db2?
Name some fields from SQLCA.
why should we bind the DB2 program . What if we did not BIND a BD2 program ??
9 Answers Infosys, TCS, Xansa,
How do you select a row using indexes in db2?
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?
in db2, already 10 columns arie der, and i want to insert 11th column. what parameters u wil consider for insertion and how will u insert
can any one give the list of some important sql abend codes which r frequently asked in interviews?
What is a collection in db2?
What is data manager?
One program calling 5 subprograms, its a cobol db2 program, after precompilation how many plans and packages will created?
When do you use the IMAGECOPY?
How does coalesce work?