[OT] Table Creation Syntax + Visual SQL Query Builder // A GREAT Mac Cocoa MYSQL tool - Donationware

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Thu Jan 6 14:11:54 EST 2011


On 1/6/11 9:04 PM, "Bob Sneidar" <bobs at twft.com> wrote:

> For sqLite I do something like this (keeping in mind I use sqlYoga):
> 
>     put dbconn_get("connection id", "secconn", "secondary") into theSecID --
> sqlYoga
>     put "SELECT tbl_name,sql FROM sqlite_master WHERE type = table" \
>             into theSQL
>     replace "tbl_name" with quote & "tbl_name" & quote in theSQL
>     replace "sql " with quote & "sql" & quote & space in theSQL
>     replace "table" with quote & "table" & quote in theSQL
>     put revDataFromQuery(comma, return, theSecID, theSQL) into theSQLData
> 
> This will give me all the Create Table syntax for every table in the sqLite
> database I access.

I see, Bob,

You are using sqlite_master  system table to extract original
    create table ... command

Interesting, if this is changed on any ALTERs ...
Although it seems there is no alters ...


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]






More information about the use-livecode mailing list