-
sql problem
Hi,
I want to know what is the different between these querys
SELECT *
FROM table1, table 2
WHERE ...
and
SELECT *
FROM (table1, table2)
WHERE ...
When i try to execute the last query, i have an oracle error like that
ORC-00928: Missing SELECT keyword
Thanks
-
i would assume that oracle is complaining about the '(' & ')' in the from clause. typically the '(' in a from clause is signaling to oracle that there is going to be a select that follows such as :
select *
from (select * from table1),
(select * from table2)
where ...
-
Second SELECT is not syntactically correct.
If you are using 9i then you can use ANSI join syntax in FROM clause like
select *
from table1 join table2
-
well normally a '(' after a FROM indicates a following Sub-query hence the error in the 2nd query.
Using a join is better but tedius.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|