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.

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

update comments
   set approved='true'
        where approved='false'
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.