Monday, October 24, 2011

A SQL HEART table....

Out of Syllabus 16

merge into HEART
using (select * from LOVE where NAME='******')
on (HEART.CHOICE=LOVE.CHOICE)
when matched
then update set (HEART.STATUS='HAPPY')
when not matched
then insert into (HEART.NAME,HEART.STATUS) values ('******','beta man mein laddu futa');

COMMIT;


Thing is that, since i pressed COMMIT, there is no way to ROLLBACK!!!

SOLUTION:- truncate table HEART;

RESULT:- Database 'HEART' got corrupted!!!


NB:- If you find any error in the code, well, just raise a BUG!!!

No comments:

Post a Comment

Put in your thoughts here!!!