What are the major differences between the mysql and oracle sql dialects?

Yashima picture Yashima · Sep 2, 2011 · Viewed 85.7k times · Source

I am a software developer. I have used mysql for years and now I am about to have my first encounter with oracle in a project.

I was just told that I should be careful that the sql behaves quite differently in some cases. I have no idea what to expect. I am mostly looking for obvious stuff and typical beginner mistakes.

For example I was told that oracle as no auto increment.

That's the type of stuff I am looking for. I'd be grateful for any further knowledge that helps avoid creating new solutions to problems already solved.

Answer

duffymo picture duffymo · Sep 2, 2011

For example I was told that oracle as no auto increment.

Oracle has sequences; it's just a different notation. The idea of a column value that's automatically incremented on INSERT is certainly there.

Oracle will have you add primary and foreign keys as constraints, separate from the table definition.

PostgreSQL is the closest thing to Oracle among the open source databases. It, too, has sequences.