I literally always have to look up the meaning of :limit in migrations when it comes to integer values. Here’s an overview. Now let’s memorise it (oh, this works for MySQL, other databases may work differently):
Posts Tagged ‘sql’
Once and for all: Rails migrations integer :limit option
August 20th, 2009SQL: Ordering with NULL values
November 14th, 2008First seen at Kabisa Blog: SQL: Ordering with NULL values
This post tells you how to sort NULL values in a column to the bottom and sort the remaining non-NULL values.
This is really great in combination with LEFT JOIN queries that may yield NULL values.
