I want to experiment with the 3 large database management systems. For this purpose it would be cool to have the same database (the same tables, etc.) for each of those.

Where can I find sql scripts which create identical test databases for MySQL, MSSQL and Oracle?

  • Can you create a new account on dba.se using the OpenID you use on SO, then we'll be able to merge the two accounts from here if you ping me with a comment here or on The Heap Commented Feb 23, 2012 at 17:08
  • 1
    As an aside to Justin's excellent answer, Microsoft has a set of SQL Server sample databases here. Commented Mar 9, 2012 at 18:36

3 Answers 3


Oracle provides several sample schema, but as with Rolando's answer, you would have to convert these for the other databases.

My answer in a nutshell is Don't use identical scripts.

The problem with using scripts that are as similar as possible for each database is that you will be using least common denominator functionality. Using a database requires an investment in infrastructure, installation, support and development that will not reach it's full potential if the advantages of each platform are not utilized.

To truly do a comparison of these platforms, I suggest you determine what your requirements are and then implement those requirements in the best way possible for each database. This will of course require significantly more knowledge of the platforms, but any other comparison would only be academic.

Here are two examples.

Requirement: Show all days in a given date range with sales data for the day regardless of whether any sales were made that day or not.
Solutions: In Oracle you might do a cross join with a hierarchical query on dual returning all the days in the range. In SQL-Server you might use a CTE to generate the days. In MySQL you might use something else entirely.1

Requirement: Be able to run a query at any time to retrieve the data for any table as it existed at any point in time within the last four hours.
Solution: In Oracle you would only need to ensure that the undo retention was guaranteed and set to at least four hours. In other databases the implementation would be dramatically different.2

  • Bookmarking this one. +1 !!! Commented Feb 22, 2012 at 18:15
  • Yes, yes a million times yes!
    – HLGEM
    Commented Mar 9, 2012 at 16:09

MySQL provides a sample employee and world database

You may want to convert the SQL for these to work in Oracle and SQL Server


You can try to solve the same exercises on the same databases using MSSQL, MySQL, PostgreSQL at SQL Exercises site .

Oracle is in future plans.

P.S. Oracle is available now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.