Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change a value of a record in whole database . URGENT

Status
Not open for further replies.

MarioVITAL

IS-IT--Management
Apr 4, 2003
3
0
0
PT
hi all
i have a table with a field that have a default value , now i change that value , but will only affect the news records ... my problem is to change the old value with the new one in all the records / field i have in my table..

this is very urgent
 
update tablename set fieldname=newvalue ;-)
 
TRy somethign like this


update table_name set column_name = 'value' where ID IS NOT NULL


where ID is you r primary key

This will change every the value in a set column for every record that has got a not null key

Bye

Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
Swampboogie,

I think your statement will only work if MarioVITAL has never modified any of the records and left the default value.

Mind you, my way is far from elegant... but it does the job.


Bye

Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
Cool man

Mine was not a criticism

I would never say anything to the only one that has ever helped me when I posted my questions.


Bye


Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top