polkadot (2/25/2013)
SQL_Enthusiast,I double and triple checked the book and the WHILE query in my original post is a facsimile.
The where clause condition is slightly different, it excludes o1.supervisor<>o1.employee. The JOIN is on o1.employee=o2.supervisor. I'm not sure if that makes a difference....
your "where" makes query to return 0 rows, so nothing get inserted.
What data you expect in a table as a result of the execution of query #2?