I can see that doing this:

create table ReadCode
(SUBJECT_TYPE varchar
        READ_CODE varchar
        TERM30 varchar
        TERM60 varchar);

Seems to work just the same as does this:

create table ReadCode
(SUBJECT_TYPE text
        READ_CODE text
        TERM30 text
        TERM60 text);

Is there any recommended way or does it just not matter?

RBS


-----Original Message-----
From: RB Smissaert [mailto:[EMAIL PROTECTED] 
Sent: 19 November 2006 23:26
To: sqlite-users@sqlite.org
Subject: [sqlite] Create table / data types

New to SQLite and wondering what the correct syntax is to create a table.
I have seen this syntax and that is what I use now and it works fine:

create table ReadCode
(SUBJECT_TYPE varchar(5)
        READ_CODE varchar(5)
        TERM30 varchar(30)
        TERM60 varchar(60));

But it looks now that one doesn't have to specify the field size as SQLite
will automatically adjust to the data size.
So can I leave the (5) etc. off? I am coding in VB.

Also, how would I translate these data types of Interbase to SQLite data
types:

BLOB
DATE
DOUBLE
LONG
SHORT
TEXT
VARYING

I take it that it will be like this:

BLOB      > BLOB
DATE      > TEXT
DOUBLE    > REAL
LONG      > INTEGER
SHORT     > REAL
TEXT      > TEXT
VARYING   > TEXT


RBS



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




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

Reply via email to