Re: Creating a table with multiple key and boolean fields in SQL
- From: "Lee-Z" <Lee-Z.spam@xxxxxxxxx>
- Date: Mon, 25 Jul 2005 10:12:13 +0200
You can put the PK in the Create statement
CREATE TABLE ThirdTable (Field1 TEXT, Field2 TEXT, Field3 INTEGER
CONSTRAINT MyFieldConstraint PRIMARY KEY (Field1,Field2));(example is VBA,
so from delphi, might need bit of adjusting, but basically, this is
it)"Boolean" in Access is "Yes/No"Lee-Z
"Dave Blake" <barnswood@xxxxxxxxxxx> wrote in message
news:42e49850@xxxxxxxxxxxxxxxxxxxxxxxxx
> I'm having problems using DDL SQL commands via ADO onto an Access mdb
> file.
> Can someone point me at a reference source for the supported syntax etc.?
>
> Or specifically tell me how to create a table with multiple field primary
> key and integer (not longint) and boolean fields.
>
> It is something like
> CREATE TABLE MyTable (Field1 INTEGER, Field2 INTEGER, .... FieldX BOOLEAN)
>
> but "Boolean" is wrong and Integer gives me LongInt fields.
> Then followed by
> ALTER TABLE MyTable
> ADD CONSTRAINT PK_code PRIMARY KEY (field1, field2)
> to add the primary key, or can I do it in the create statement somehow?
>
> Thanks
> Dave
>
>
.
- References:
- Creating a table with multiple key and boolean fields in SQL
- From: Dave Blake
- Creating a table with multiple key and boolean fields in SQL
- Prev by Date: Creating a table with multiple key and boolean fields in SQL
- Next by Date: Re: Local dataset show parts in two grids
- Previous by thread: Creating a table with multiple key and boolean fields in SQL
- Next by thread: Re: Creating a table with multiple key and boolean fields in SQL
- Index(es):
Relevant Pages
|