Crazy Translations of Simple SQL Expressions to Various SQL Dialects

SQL is standardised by ISO / IEC. We have wonderful standards, such as SQL-92, SQL:1999, SQL:2003, SQL:2008. Right? In theory. In practice, many things do not have an equivalence between the actual SQL implementations. This is very true for common function support - most of which are not part of any standard. Here's an interesting … Continue reading Crazy Translations of Simple SQL Expressions to Various SQL Dialects

Funky String Function Simulation in SQLite

SQLite is so light, it doesn't have any useful string functions. It doesn't have ASCII(), LPAD(), RPAD(), REPEAT(), POSITION(), you name it. It does, however, have a wonderful RANDOMBLOB() function. So if you really need a good random number generator, use a SQLite database and generate a 1GB blob. That should give you a couple … Continue reading Funky String Function Simulation in SQLite

What are procedures and functions after all?

Many RDBMS support the concept of "routines", usually calling them procedures and/or functions. These concepts have been around in programming languages for a while, also outside of databases. Famous languages distinguishing procedures from functions are: Ada BASIC Pascal etc... The general distinction between (stored) procedures and (stored) functions can be summarised like this: Procedures: Are … Continue reading What are procedures and functions after all?