• 0

[SQL] update multiple rows


Question

Hello guys, I couldn't really remember or find anything for this.

I've got a table with rows in.?

Each row has an ID. ?I would like to update column 2 to be either 1 or 0 (its a bit data type)

So I've got a list of IDs whose column 2 needs to be updated.

What is the syntax for this again?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

just a point, if you are updating a lot of rows use a join as it is more efficient then this method..

but this is perfectly acceptable for an ad-hoc query :)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.