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.
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.