Consider a table:

     CREATE TABLE t1(a INTEGER, b INTEGER);
     INSERT INTO t1 VALUES(1,2);
     INSERT INTO t1 VALUES(9,8);

I am reworking (read: trying to fix) the name resolution algorithm in  
SQLite and I am wondering what is the correct behavior of the  
following queries?  Can anybody tell me what PostgreSQL or MySQL or  
SQL Server or Oracle do with these?

     SELECT a AS b, b AS a FROM t1 ORDER BY a;
     SELECT b AS a, a AS b FROM t1 ORDER BY a;
     SELECT a, b AS a FROM t1 ORDER BY a;
     SELECT a AS x, b AS x ORDER BY x;

     SELECT a AS b, b AS a WHERE a=1;
     SELECT a AS b, b AS a WHERE a=2;
     SELECT a AS x, b AS x WHERE x=1;




D. Richard Hipp
[EMAIL PROTECTED]



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to