Re: [sqlite] Re: Re: how to get field names of empty tables ?

2007-02-24 Thread Stef Mientki



Scott Hess wrote:

I think only the dot commands are special (.help, etc).  Everything
else is fair game.  Best reference for what you can feed a prepare or
exec is http://www.sqlite.org/lang.html .

Scott,
thanks for this valuable information.
Now how beautiful it would be if it was all in 1 pdf file ;-)

cheers,
Stef


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Re: Re: how to get field names of empty tables ?

2007-02-23 Thread Scott Hess

I think only the dot commands are special (.help, etc).  Everything
else is fair game.  Best reference for what you can feed a prepare or
exec is http://www.sqlite.org/lang.html .

-scott


On 2/23/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote:

Stef Mientki <[EMAIL PROTECTED]> wrote:
> Igor Tandetnik wrote:
>> Stef Mientki
>> <[EMAIL PROTECTED]>
>> wrote:
>>> is there an SQL statement to get the field-names of empty tables ?
>>
>> PRAGMA table_info(tableName);
>
> I had seen that command,
> but I wrote something about that these commands could only be run from
> the command line.

No. You can run it just like you run any statement, and it produces a
resultset with one row for each column in the tableName table.

sqlite3 command line application is not black magic. It uses public
SQLite API only. You can look at the source code and see for yourself,
if you are so inclined.

Igor Tandetnik


-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Re: Re: how to get field names of empty tables ?

2007-02-23 Thread Igor Tandetnik

Stef Mientki <[EMAIL PROTECTED]> wrote:

Igor Tandetnik wrote:

Stef Mientki
<[EMAIL PROTECTED]>
wrote:

is there an SQL statement to get the field-names of empty tables ?


PRAGMA table_info(tableName);


I had seen that command,
but I wrote something about that these commands could only be run from
the command line.


No. You can run it just like you run any statement, and it produces a 
resultset with one row for each column in the tableName table.


sqlite3 command line application is not black magic. It uses public 
SQLite API only. You can look at the source code and see for yourself, 
if you are so inclined.


Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-