Is it possible to nest a select statement in the set clause of an update statement?
Not entirely sure what you want to do, can you give an example? Also, which version of what database would you like to do this on? 🙂
If the dbms supports subselects, then yes.
Mysql 3.xx doesn't allow it, but it should be okay in 4.0
update myTable set myCol = (select count(*) from anotherTable)
I was just asked the question about access and found that you can't have a subselect in an update statement if the table you want to update is in the subselect. I thought there may be a way around it but it doesn't look like it without writing another SQL statement.
Thanks for the help!!