Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

UPDATE without WHERE Clause

Former Member
0 Likes
1,550

Hi

What will happen if we use Update statement without WHERE clause?

Thanks

Hi

What will happen if we use Update statement without WHERE clause?

Thanks

4 REPLIES 4
Read only

Former Member
0 Likes
1,006

It will update all the records of the particular table..when it is used as follows..

UPDATE ztable SET f1 = 'test'.

If you are using within select-endselect loop it just updates one record.

Regards

Anurag

Message was edited by: Anurag Bankley

Read only

0 Likes
1,006

hi,

1) UPDATE dbtab SET f1 ... fn.  -> <b>all values are changed</b>
2) UPDATE dbtab.       -> <b>only 1</b> item is changed

A.

Message was edited by: Andreas Mann

Read only

Former Member
0 Likes
1,006

hi,

The statement UPDATE changes the content of one or more lines of the database table if no where condition is specified.

Regards,

Sailaja.

Read only

Former Member
0 Likes
1,006

HI,

Update without where caluse updates all the

rows with the values specified in set.

update ztable set matnr = '100'.

update ztable with matnr 100 for all rows.

Regards,

Amole