Hi all:

Suppose a dBase named dBase1 and a table declared in it:

CREATE TABLE 'tb1' (Id INTEGER PRIMARY KEY,  Nm INTEGER,  Ci INTEGER);

Then, after some inserts I open a new dBase, say dBase2, and duplicate dBase1.tb1 with the C API functions executing the querys:

"ATTACH dBase1 AS dbOriginal"
"CREATE TABLE tb1 AS SELECT * FROM dbOriginal.tb1"

The new table is created and filled with proper values, but the new table schema isn't the same:

sqlite>.schema tb1
CREATE TABLE 'tb1' (Id INTEGER,  Nm INTEGER,   Ci INTEGER);

The PRIMARY KEY and any other constraints are lost.

Is this the usual behavior?

Must I use again the complete create sentence to get the desired design in the new table?

Thanks in advance

A.J.Millán
ZATOR Systems


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

Reply via email to