1
Vote

Primary Key

description

When I create a table in one db (eg: GCA\Us) through the command

New-Item GCA:\Us -value @{ACCOUNT="TEXT UNIQUE"; NOME="TEXT NOT NULL"; DISABILITATO="TEXT NOT NULL"}

automatically creates _id as INTEGER PRIMARY KEY

I want to use ACCOUNT as primary key, but using

New-Item GCA:\Us -value @{ACCOUNT="TEXT UNIQUE PRIMARY KEY" ...

it replies

New-Item : SQLite errortable "Us" has more than one primary keyIn riga:1 car:9+ New-Item <<<< GCA:\Us1 -value @{ACCOUNT="TEXT UNIQUE PRIMARY KEY"; NOME="TEXT NOT NULL"; DISABILITATO="TEXT NOT NULL"} + CategoryInfo : NotSpecified: ([Data Source=C:\Temp\GCA.s3db]\Us1:String) [New-Item], SQLiteException + FullyQualifiedErrorId : NewItem.Invoke,Microsoft.PowerShell.Commands.NewItemCommand

comments