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 a view? Why use it?
In cursor program perform para varying until 1 by 1 fetch para cursor------close para in the blank what will come for confirming in the database?
If I have 5 Queries in a DB2 Cobol program , while precompiling how many DBRMs will get created and How many Plans and Packages will get created while Bind Process?
Suppose the outcome of executing a query results in a row having null. Based on the answer how you use it? Its declaration and inclusion?
What do you mean by cursor?
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??
When is the authorization check on DB2 objects done - at BIND time or run time?
i want to maintain uniqueness on pdf without make lf??????????
I have 1000 rows in a db2 table.I want to update first 100 records,How do I do it?
What are the three lock types?
db2 restart logic ?
How can the firstname and the lastname from the emp table be concatenated to generate complete names?