| View previous topic :: View next topic |
| Author |
Message |
kptan Newbie

Joined: 18 Aug 2006 Posts: 4 Location: Malaysia
|
Posted: Mon Nov 06, 2006 7:46 am Post subject: Reseting the primary key |
|
|
okie i have a primary key which is jobID and its auto. but some documents which i keyed in, i want to remove it. lets say jobID #24. but the next number will be #25 and not #24. or if i keyed in like 3 datas and delete em all, the latest jobID would be #4. doesnt it start with zero again?
Thanx |
|
| Back to top |
|
 |
audionuma OOo Enthusiast


Joined: 23 Feb 2006 Posts: 126 Location: France
|
Posted: Mon Nov 06, 2006 11:59 am Post subject: |
|
|
hello,
with Tools > SQL ... you can execute the following instruction :
| Code: | ALTER TABLE "myTable" ALTER COLUMN "myIdentityPrimaryKey" RESTART WITH 0
|
0 or any integer that fits your needs ...
Just be careful if that primary key is used as a foreign key in an other table ... _________________ OOo 2.3 / Mac OS PPC X.4.11 |
|
| Back to top |
|
 |
|