Posts

Showing posts from February, 2013

@@Error in SQL

What do you think the output of the following SQL program would be?  Create table Test(testID tinyint) Begin Tran Insert into Test(testID ) values (1) PRINT @@ERROR Insert into Test(testID ) values (300) // This statement will generate an error as 300 is not a tinyint  PRINT @@ERROR IF @@ERROR = 0  BEGIN  COMMIT TRAN END ELSE  BEGIN  ROLLBACK TRAN END  The transaction will be Committed :) Surprised?. Since, we have a PRINT @@ERROR statement before the IF statement, this condition will be executed as true and the output of @@ERROR will be 0.

Registered Trademark in HTML

You can add a registered trademark in HTML by adding "&reg";" without the double quotes. For Example: Sree Corp Inc ® If you want it add as a superscript, just add followed by "&reg";"