• For the last query:

    select COUNT(convert(int,NULL)) from #temp

    It will return 0 because when you execute the query:

    SELECT CONVERT(int,NULL) it will return NULL and as the return type of COUNT is INT so NULL will implicitly

    converted to '0'.

    Hope it will clear to you now Yogi 🙂

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/