Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Using sys.index_columns Expand / Collapse
Author
Message
Posted Tuesday, December 20, 2011 10:41 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Wednesday, January 02, 2013 10:06 AM
Points: 619, Visits: 128
Nice question on something I don't believe I've ever thought much about. I learned something!

Thanks, can't wait for your next!
Post #1224639
Posted Tuesday, December 20, 2011 1:12 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 8:52 AM
Points: 2,574, Visits: 1,532
Nice question. Keep 'em coming!
Post #1224731
Posted Wednesday, December 21, 2011 4:01 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:26 AM
Points: 7,086, Visits: 7,140
Good question. The formatting wasn't an issue for me, I just pasted the answers into notepad and started to put line breaks and spaces where I would put them if writing SQL - and realised before I finished that I would be wasting time doing any more formatting as the four answer options were identical apart form a couple of column names, which made it all pretty clear (apart from remembering which of the column ids was the id in the parent table).

I think the explanation is slightly wrong, though, as it seems to suggest that key_ordinal is the same as index_column_id in all entries in sys.index_columns for anything except columns of clustered indexes; but actually this can only be true for key columns, since for non-key columns key_ordinal is always 0.


Tom
Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
Post #1225004
Posted Thursday, December 22, 2011 4:12 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Saturday, March 16, 2013 9:53 AM
Points: 847, Visits: 768
Thank you for the question

Iulian
Post #1225705
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse