What is the best way to run simple sql scripts in a database (preferably db implementation agnostically)?
So, for illustration purposes, using your best/suggested way, i'd like to see a script that creates a few tables with names from an array ['cars_table', 'ice_cream_t'], deletes all elements with id=5 in a table, and does a join between two tables and prints the result formatted in some nice way.
- I've heard of Python and PL/SQL to do this
- Ruby/Datamapper seems very attractive
- Java + JDBC, maybe
- Others?
Some of these are mostly used in a full application or within a framework. I'd like to see them used simply in scripts.