Nouman Zakir

while (true) { Post.NewArticle(); }
posts - 16, comments - 25, trackbacks - 0

My Links

News

Archives

Post Categories

Personal Website

Using SELECT statement to UPDATE records in SQL

You can use SELECT statement to update records through UPDATE statement.
In the SET Clause use the SELECT statement along with desired filters to
update the records.


UPDATE tblDestination
SET tblDestination.col=value
WHERE EXISTS (
SELECT col2.value
FROM tblSource
WHERE tblSource.join_col=tblDestination.join_col
AND tblSource.constraint=value)
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Tuesday, August 04, 2009 6:28 AM | Filed Under [ SQL ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: