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: 2 days ago @ 6:13 AM
Points: 2,598, Visits: 1,551
Nice question. Keep 'em coming!
Post #1224731
Posted Wednesday, December 21, 2011 4:01 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 4:53 PM
Points: 7,182, Visits: 7,281
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
Is minic a gheibheann béal oscailte dorn dúnta.
Is minig a cheapas beul fosgailte dòrn dùinte.

http://es.linkedin.com/in/tomthomsonsoftware
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: Thursday, June 13, 2013 6:47 AM
Points: 847, Visits: 770
Thank you for the question

Iulian
Post #1225705
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse