No, they aren't the same!
The in first example:
like' + '''%anurag%'''
^ ^^^ ^^^---- Close second string
| ||| ||----- 2nd character of a pair of quotes\
| ||| | - These create a single ' character
| ||| |------ 1st character of a pair of quotes/
| |||--------------- 2nd character of a pair of quotes\
| || - These create a single ' character
| ||---------------- 1st character of a pair of quotes/
| |----------------- Open second string
|--------------------- Close first string
In the second example:
like '''%anurag%''' '
||| ||| |----- Or this...
||| |||------- Or this...
||| ||-------- Or this...
||| |--------- SQL not going to look at this...
||| ERK! SQL NO UNDERSTAND! **REDO FROM START** ***OUT OF CHEESE ERROR***
|||------------------ End of first string
||------------------- 2nd character of a pair of quotes\
| - These create a single ' character
|-------------------- 1st character of a pair of quotes/