Re: [sqlite] How to build mutil-primary key for a table?

2009-07-01 Thread Kermit Mei
On Wed, 2009-07-01 at 22:45 -0400, Igor Tandetnik wrote:
> Kermit Mei wrote:
> > I have three table like this:
> >
> > Device(id,name,icon,type) -id as primary key
> >
> > ZWavePhsicalDevice(id,funcode)  -id as primary key
> >
> > ZWaveGSDevice(Device.id, ZWavePhsicalDevice.id,order)
> > -Device.id and ZWavePhsicalDevice.id as mutil primary keys.
> >
> > Now, I don't know how to build the ZWaveGSDevice(...) in sqlite3 ?
> 
> The same way as in any other SQL database:
> 
> create table ZWaveGSDevice(Device_id, ZWavePhsicalDevice_id, order,
> primary key(Device_id, ZWavePhsicalDevice_id));
> 
> Igor Tandetnik 

I see. Thanks, Igor:p

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to build mutil-primary key for a table?

2009-07-01 Thread Igor Tandetnik
Kermit Mei wrote:
> I have three table like this:
>
> Device(id,name,icon,type) -id as primary key
>
> ZWavePhsicalDevice(id,funcode)  -id as primary key
>
> ZWaveGSDevice(Device.id, ZWavePhsicalDevice.id,order)
> -Device.id and ZWavePhsicalDevice.id as mutil primary keys.
>
> Now, I don't know how to build the ZWaveGSDevice(...) in sqlite3 ?

The same way as in any other SQL database:

create table ZWaveGSDevice(Device_id, ZWavePhsicalDevice_id, order,
primary key(Device_id, ZWavePhsicalDevice_id));

Igor Tandetnik 



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] How to build mutil-primary key for a table?

2009-07-01 Thread Kermit Mei
Hello community!

I have three table like this:

Device(id,name,icon,type) -id as primary key

ZWavePhsicalDevice(id,funcode)  -id as primary key

ZWaveGSDevice(Device.id, ZWavePhsicalDevice.id,order)
 -Device.id and ZWavePhsicalDevice.id as mutil primary keys. 

Now, I don't know how to build the ZWaveGSDevice(...) in sqlite3 ?

Hope any help.
Thank you, very much!

Kermit Mei

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users