vbnullchar Posted March 20, 2007 Share Posted March 20, 2007 i wanted to update all my tables field value to "0", but the problem is i got 20 fields the usual way "update table1 set field1=0,field2=0,field3=0....field20=0 where id='my_id'"; is there a way to update all fields without specifying the fields to update? Quote Link to comment Share on other sites More sharing options...
btherl Posted March 20, 2007 Share Posted March 20, 2007 No there's not.. you might want to redesign your database if this is a recurring problem. Otherwise, just write a function to set all the fields to 0 and you're finished. It only has to be written once. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.