Nuther sqLite gotcha

Bob Sneidar bobs at twft.com
Wed Mar 23 18:15:24 EDT 2011


Hi all. 

If anyone ever wants to get  the SQL for creating an existing table in sqLite by querying the sqLite_master table for table entries, be aware that whoever created the table may or may not have enclosed the table name in quotes! So if you are doing a line offset to find let's say "CREATE TABLE devices" and the person who created the table used quotes you will not find that line! Apparently, sqLite records the exact sequel used to create the table, not the sanitized SQL that would be used to do it, like in mySQL. (but I could be wrong about mySQL being sanitized). 

You may say, "Why not just search for the table name and be done with it?" Because there may be a column definition in there with all or part of the column name being the table name you are looking for. 

I'm sure this is quite obscure, but it just bit me in the buttocks so I thought I'd put that out there. 

Bob






More information about the use-livecode mailing list