I've got a table in sqlserver with an id column with unique identifier type and default value newsequentialid(). I need to reference these keys from another table so i need to exactly move this column as FK to another table but when i use SQLExecutor() with query 'select id from table' to write these attribute the order of GUID's get disruted and does not maintain its original order? Is it possible to maintain its order?
Solved
SQLExecutor disrupts uniqueidentifier order? how to maintain it?
Best answer by takashi
Hi @dzhakob, generally you cannot expect any regularity on the order of records in a query result unless you specify the order explicitly with the SQL statement. Consider adding ORDER BY clause to the SQL statement if you need to sort the resulting records.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.