0

I have two simple tables let's say country and state. Suppose, I need to use left join on the state table. It can be written in MySql using ANSI syntax something like the one shown below.

select c.country_id, c.country_name, s.state_name 
from country c left join state s on s.country_id=c.country_id

In Oracle, the same SQL can be rewritten using Theta syntax as follows.

select c.country_id, c.country_name, s.state_name 
from country c, state s where s.country_id(+)=c.country_id

Can I write some way the preceding SQL (Theta syntax) in MySql?, since I had been often using Theta style of SQL in Oracle.

Bhavesh
  • 4,607
  • 13
  • 43
  • 70
  • I never heard that (horrible) syntax being called "Theta". Theta-joins (θ-joins) I thought were a generalization (`<`, `>`, `<=`, ...) to equal-joins. – ypercubeᵀᴹ Mar 18 '12 at 23:23

1 Answers1

3

You can't use that (old Oracle) syntax in MySQL.

See this answer for why you should not be using that (old) syntax any more, not even in Oracle.

Community
  • 1
  • 1
ypercubeᵀᴹ
  • 113,259
  • 19
  • 174
  • 235