For SQL select returning more than 1 value, how are they sorted when Id is GUID?
Posted
by Chris F
on Stack Overflow
See other posts from Stack Overflow
or by Chris F
Published on 2010-04-27T18:11:08Z
Indexed on
2010/04/27
18:13 UTC
Read the original article
Hit count: 294
sql
|nhibernate
I'm wondering how MSSQL orders data that is returned from a query and the Id columns of the respective tables are all of type uniqueidentifier.
I'm using NHibernate GuidComb when creating all of the GUIDs and do things like:
Sheet sheet = sheetRepository.Get(_SheetGuid_); // has many lines items
IList<SheetLineItem> lineItems = sheet.LineItems;
I'm just trying to figure out how they'll be ordered when I do something like:
foreach (SheetLineItem lineItem in lineItems)
I can't see to find a good article on the way GUIDs are compared by SQL when being ordered, if that's what's happening.
© Stack Overflow or respective owner