To Update 100 Columns in a single query
I need to update a table which contains more than 100 columns in it. I'm using an update query to do this. My problem is instead of specifying all the 100 columns in an update query is it possible to update without the column names.
Query:
开发者_如何学PythonUpdate tbleName set Col1='',Col2='',Col3='',.....Coln='';
commit;
Is there any possibility to update this table columns without specifying 100 columns.
Note:
This table contains more than 120 columns but I need to update 100 columns .
Sorry, I forgot mention this, I need to update first 100 columns only!!!
Thanks in advance!
--Ranga
No you must
have to specify which column value you want to modify in update statement.
Considered little application thats reads column names from this table and prepares update query? I think you could even use stored procedures for that.
120 columns? Ouch, that's a pain. You could build up a sql string and just execute it.
精彩评论