Thursday, July 26, 2012

IF EXISTS:

we may a face situation that need to verify the given 'value' or 'key' exists a table. SQL provides EXISTS key word in order to check the given value. In such scenarios, we can use the follwing IF condintion with EXISTS to procced the process furhter.

Eg: In a SELECT query if the value present in the table then return 1, so that condition will be true.




 

No comments:

Post a Comment