Application Development 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: 

UPDATE without WHERE Clause

Former Member
0 Kudos

Hi

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

Thanks

4 REPLIES 4

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

hi,

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

Regards,

Sailaja.

Former Member
0 Kudos

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