Skip to content

Tag: SQL

Cursor definition and looping with MS SQL

In MSSQL, I needed to loop over a bunch of orders and execute a stored procedure, except in one case. This does that: Read More »

Some new (upcoming) PostgreSQL features

These are some random new PostgreSQL features that I'm interested in: The EXECUTE USING feature in PostgreSQL 8.4 will allow the use of more secure dynamic SQL in PL/PgSQL. Read More »

Purging a MySQL database without losing meta data

When I clone a production database to a development database, I always need to empty the development database first. I could never find an SQL command to completely purge a database, bur, recently, I learned something about MySQL that surprised me: MySQL doesn't lose the user rights for a database when you drop it. So, purging a MySQL database (without losing any access data meta data about that DB) is as simple as issuing the following statements: Read More »