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



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to