Check for a NULL/nil YAML value stored in a database column

By | March 4, 2014

I was trying to google for searching a database for a nil yaml value and it took me a bit so I thought I would post my findings.  Basically if you do this in the rails console:

you’ll receive:

Kind of irritating when you’re trying to write a SQL query. So to check for a null column in the traditional sense as well as YAML, you can do so with the following query:


Leave a Reply

Your email address will not be published. Required fields are marked *