Subject Re: RFC: Cross database queries
Author lacakus
> Well, first question - how does it look from SQL standard POV?

AFAIK SQL stand. does not define external datasources nor external
tables.

AFAIK SQL:2003 defines only :
<catalog>.<schema>.<table>

> With slightly modified (avoid '@' in favour of '.')
I suggest also '.' instead of '@' like MS SQL for linked servers:
<server>.<catalog>.<schema>.<table>
(<datasource>..<table>)

If not acceptable, then use Oracle's "@" ... and then accept also
Oracles :

CREATE DATABASE LINK dblink
[ CONNECT TO
{ CURRENT_USER
| user IDENTIFIED BY password
[ dblink_authentication ]
}
| dblink_authentication
]
[ USING 'connect_string' ] ;

or Firbird modified (like CREATE DATABASE ... does not introduce
new "DATA SOURCE" and "PROVIDER" keywords):

DECLARE EXTERNAL DATABASE dblink
{CONNECT | USING} 'connect_string'
[USER 'username' [PASSWORD 'password'] | CURRENT_USER]

Keep it as simple as posible.