May 31, 2012 at 8:57 am
I executed this query:
update table2
set id=(select max(id) from table1)
where id=0.
It indicates it executed,but on checking no update happened.Out of curiosity what could be the cause of this?I repeated the process successfully.
“When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris
May 31, 2012 at 9:17 am
The only thing that pops to the top of my head is that it was in a transaction that rolled back.
May 31, 2012 at 9:54 am
kapfundestanley (5/31/2012)
I executed this query:update table2
set id=(select max(id) from table1)
where id=0.
It indicates it executed,but on checking no update happened.Out of curiosity what could be the cause of this?I repeated the process successfully.
how many records do you have in table2 where id=0 ?
SELECT * FROM table2 WHERE id = 0
Can you execute SELECT MAX(id) FROM Table1
?
What does it return?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply