How to update more then one record using update?
Answers were Sorted based on User's Feedback
Answer / pratap singh
For this concern you can use or oprator along with where
clause, Example
WHERE DEPT_ID='D110' OR 'D001' OR 'D105'
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / sivakumar sekharannair
update query without "where" command will update multiple
rows in the table;
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / selvam a
Update a table using a symbolic cursor:
UPDATE WHERE CURRENT OF limits the scope of DB2 updates to
one row at a time, specifically the row your cursor is
positioned on.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / guna
UPDATE table1 set columnname = (SELECT columnname from
table2 where some condition)
You can also use EXISTS instead of '=' for updating
Is This Answer Correct ? | 0 Yes | 2 No |
What is an inner join, and an outer join ?
I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?
What happens to the PLAN if index used by it is dropped?
How to resolve -803 sql code in DB2?
how to resolve -805 . how to see dbrm and package not found
Where besides the DB2 catalog is database object information stored by DB2?
If we keep the DCLGEN structure for a table in a copybook and include it in the COBOL program using the COPY statement, will there be any impact during compilation or at any stage of program execution?
Usually, which is more important for DB2 system performance - CPU processing or I/O access?
what's the error code for Unique Index Violation?
What is explain plan in db2?
What is a DB2 access path?
My DB2 program first read the data from a file and then it look into a table with the data it got from the file.If we did not bind the program , should the file read before SQL execution be success??