Keep in mind though, that this will return the SQL used to create the table,
NOT the optimum SQL or some standard SQL syntax for creating the table. This
differs from mySQL in that mySQL will return the standard syntax for creating
that particular table.
This may seem like nitpicking, until yo
Depending on what information you need to collect, there is another way -
see pragma table_info on the sqlite web site. It gives basic info about
each column in a table, including the name, data type, whether it can be
null or not, default value, and whether it is part of the primary key.
Easier to
Yeah, I think the dot functions are specific to the interactive client, but
i'm not positive. Either way, it works well.
On Tue, May 26, 2015 at 12:42 AM, Terence Heaford
wrote:
> Thanks Mike,
>
> I thought maybe I’d missed a built in function for this.
>
> All the best
>
> Terry
>
>
> > On 25 M
Thanks Mike,
I thought maybe I’d missed a built in function for this.
All the best
Terry
> On 25 May 2015, at 20:18, Mike Bonner wrote:
>
> get revdatafromquery(,,sDatabaseId,"select sql from sqlite_master where
> name='COMPANY'")
>
> This will return the SQL to create the table as a row
get revdatafromquery(,,sDatabaseId,"select sql from sqlite_master where
name='COMPANY'")
This will return the SQL to create the table as a row of returned data.
SDatabaseId is of course the database connection id.
On Mon, May 25, 2015 at 12:45 PM, Terence Heaford
wrote:
> How do you implem
How do you implement the following DOT function in LiveCode
sqlite>.schema COMPANY
CREATE TABLE COMPANY(
ID INT PRIMARY KEY NOT NULL,
NAME TEXTNOT NULL,
AGEINT NOT NULL,
ADDRESSCHAR(50),
SALARY REAL
);
Thanks
Terry
__