Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
i want to update a column entire table
i need a sql query for that one
Posted

try this..

SQL
Update table_name Set column_name=updated_value
 
Share this answer
 
Try:
SQL
UPDATE MyTable SET MyColumn=MyValue
If you don't specify a WHERE clause, all rows are updated.
 
Share this answer
 
Update Tablename set [date]=getdate()
 
Share this answer
 
Please try to do some work from your side and ask questions with code issues you have. An open question like the above is not recommended. A simple Google Search for SQL Update will fetch lot of results and with that you could have started.

Please refer below for some reference .

http://www.w3schools.com/sql/sql_update.asp[^]


https://www.google.co.in/?gws_rd=ssl#q=SQL+update+column[^]
 
Share this answer
 
v2
To update the entire column, in the table just execute this SqlCommand on your database server.

C#
"UPDATE table_name SET column_name = value"


Since there is no WHERE clause, this would update the column in the entire table. For more on databases in C#, read this article How to connect SQL Database to your C# program, beginner's tutorial[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900