Non-verbose TABLE syntax

  • Thread starter Thread starter Jamie Collins
  • Start date Start date
J

Jamie Collins

I just stumbled upon this (should appeal to the SELECT * fanatics
<g>):

TABLE Table1, Table2;

Apparently valid Jet 4.0 SQL syntax that returns all columns for the
cross join of the tables. What do you reckon: OK for production code
<g>?

Jamie.

--
 
Makes for a nice littel Cartesian join. I ran a query like it with 82 records
in each table and it returned 6724.

I've had developers on an Oracle database do something similar with over 1
million records in one table and 8 million in the other. Then they wonder why
"my" database is so slow!
 
In
Jamie Collins said:
I just stumbled upon this (should appeal to the SELECT * fanatics
<g>):

TABLE Table1, Table2;

Apparently valid Jet 4.0 SQL syntax that returns all columns for the
cross join of the tables. What do you reckon: OK for production code
<g>?

I wasn't aware that syntax worked other than in union queries; e.g.,

TABLE Table1 UNION TABLE Table2;

I'd be inclined to avoid it, on the grounds that it adds unnecessary
non-portability.

You'll notice that if you create such a query in the Access query
designer, then save it, Access automatically converts it to

SELECT * FROM Table1, Table2;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top