On Sun, 02 Dec 2007 13:42:17 +0100, Stefan Finzel
<[EMAIL PROTECTED]> wrote:

>Hi!
>
>Is there a way to get the column names as part of the insert statment, like
>
>INSERT INTO DefConfig (Class,Status,Var,Type,Val,Remark) VALUES 
>('sgLog','enabled','Log,PID','boolean','1','default');
>
>instead of
>
>INSERT INTO "DefConfig"      VALUES 
>('sgLog','enabled','Log,PID','text','1','default');
>
>Reason: There are nearly identical tables in several databases. Each of 
>them may be altered by users in column ordering or even may have 
>additional columns with default settings. With available column 
>information it would be more easy to transfer data between them:
>
>sqlite3 default_db ".dump DefConfig" | egrep -v '^INSERT INTO ' | 
>sqlite3 user_db
>
>
>I also miss the column names and table name using the output of a select 
>statement
>
>sqlite3 default_db
>sqlite> .mode insert
>sqlite> SELECT Class, Var FROM DefConfig;
>...
>INSERT INTO table VALUES('sgLog','Log,PID');
>...
>sqlite>
>
>
>TIA
>
>Stefan

PRAGMA table_info(tablename);

-- 
  (  Kees Nuyt
  )
c[_]

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

Reply via email to