You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select distinct(t.f1) from table1 t order by http://t.id
such queries, with differrent list of fields for distinct and order clause, are possible in FB, but results of ordering depends on ondisk data layout.
Such behaviour are forbidden, at least, by Oracle and PostgreSQL.
CREATE TABLE TABLE1 (
ID INTEGER NOT NULL,
F1 VARCHAR(10)
);
INSERT INTO TABLE1 (ID, F1) VALUES (1, 'q');
INSERT INTO TABLE1 (ID, F1) VALUES (2, 'w');
INSERT INTO TABLE1 (ID, F1) VALUES (3, 'e');
INSERT INTO TABLE1 (ID, F1) VALUES (4, 'r');
INSERT INTO TABLE1 (ID, F1) VALUES (5, 't');
INSERT INTO TABLE1 (ID, F1) VALUES (6, 'q');
INSERT INTO TABLE1 (ID, F1) VALUES (7, 'w');
COMMIT WORK;
The text was updated successfully, but these errors were encountered:
Submitted by: Nikolay Ponomarenko (pnv82)
Votes: 2
select distinct(t.f1) from table1 t order by http://t.id
such queries, with differrent list of fields for distinct and order clause, are possible in FB, but results of ordering depends on ondisk data layout.
Such behaviour are forbidden, at least, by Oracle and PostgreSQL.
CREATE TABLE TABLE1 (
ID INTEGER NOT NULL,
F1 VARCHAR(10)
);
INSERT INTO TABLE1 (ID, F1) VALUES (1, 'q');
INSERT INTO TABLE1 (ID, F1) VALUES (2, 'w');
INSERT INTO TABLE1 (ID, F1) VALUES (3, 'e');
INSERT INTO TABLE1 (ID, F1) VALUES (4, 'r');
INSERT INTO TABLE1 (ID, F1) VALUES (5, 't');
INSERT INTO TABLE1 (ID, F1) VALUES (6, 'q');
INSERT INTO TABLE1 (ID, F1) VALUES (7, 'w');
COMMIT WORK;
The text was updated successfully, but these errors were encountered: