What are the major differences between the mysql and oracle sql dialects?
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.
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.
Grouping is a major difference, as MySQL has its own non-standard interpretation of grouping. So if you're using a lot of clever grouping, you might find that Oracle will not execute your queries.
http://dev.mysql.com/doc/refman/5.6/en/group-by-hidden-columns.html
精彩评论