• Gaby Abed (2/27/2009)


    How many rows would this return? 🙂 (yes...it's different)

    use AdventureWorks

    go

    declare @tableA TABLE(col1 int, col2 int)

    go

    --stmt 1

    select name from tempdb.sys.tables where name like '%tableA%'

    --stmt 2

    select name from tempdb.sys.columns where name like 'col1%'

    I must admit - you TOTALLY had me... I was sitting here going "what??!?!", nothing is different! I even pasted the selects next to each other to make sure they were the same and hadn't changed. So why the different results?

    I guess you can tell me "where to go". 😀

    GOT ME!

    Chad