• Your explanation is not very clear enough. What do you mean by return( return a value or a result or a column name or ... )?

    You can use the INFORMATION_SCHEMA.COLUMNS view to check if a particular column exists in a table.


    Kingston Dhasian

    How to post data/code on a forum to get the best help - Jeff Moden
    http://www.sqlservercentral.com/articles/Best+Practices/61537/