0

Hi all,
I have a table named comments having columns id, name, email, comment, commentedon, approved, and approvedon. In some cases I would like to let the admin of my asp.net web page to approve all the comments at once. Which would be the effective sql code and why?

update comments
set approved='true'

update comments
set approved='true'
where approved='false'

Thank you.

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by __avd
0

Without where clause - DB engine update each and every row.

update comments
   set approved='true'
        where approved='false'
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.