|
Home > Archive > SQL Anywhere database > June 2005 > Primary Key with multiple columns
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Primary Key with multiple columns
|
|
| Preston 2005-06-13, 1:23 pm |
| Can someone provide a quick example showing how to create a PK spanning
multiple columns in a create table statement. The help file says to use
Sybase Central for it. I need the query ;)
Version 6.0.3
| |
| Reg Domaratzki \(iAnywhere Solutions\) 2005-06-13, 1:23 pm |
| create table t1 ( pk1 integer, pk2 integer, pk3 integer, c1 integer, primary
key (pk1,pk2,pk3) );
--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup
iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL
"Preston" <nospam@nospam.com> wrote in message
news:42adbec5$1@foru
ms-2-dub...
> Can someone provide a quick example showing how to create a PK spanning
> multiple columns in a create table statement. The help file says to use
> Sybase Central for it. I need the query ;)
>
> Version 6.0.3
>
>
| |
| Joshua Savill 2005-06-13, 1:23 pm |
| CREATE TABLE table1 (pk INT, col1 INT, col2 INT, PRIMARY KEY(pk, col1));
This will create a table 'table1' with the primary key existing on 'pk' and
'col1'.
--
Joshua Savill
iAnywhere Solutions - Product Support Analyst
"Preston" <nospam@nospam.com> wrote in message
news:42adbec5$1@foru
ms-2-dub...
> Can someone provide a quick example showing how to create a PK spanning
> multiple columns in a create table statement. The help file says to use
> Sybase Central for it. I need the query ;)
>
> Version 6.0.3
>
|
|
|
|
|