473,563 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Primary Key Offset

Hello all, thanks in advance for your help.

I have a table that contains a smallint primary key that is auto
incremented. I would like to start this table's seed value at 1000. I
thought that I could do this...

ALTER TABLE `servers` CHANGE `server_id` `server_id` SMALLINT( 4 )
DEFAULT '1000' NOT NULL AUTO_INCREMENT

But that does not seem to work.

Could anyone shed some light on how I can change the start value of an
auto increment integer?
Jul 20 '05 #1
2 2454
Hi there... im not that good at this but seems to me that u use: DEFAULT
'1000' by AUTO_INCREMENT , i think thats wrong a auto_increment cant have
default value's...

I can be wrong but i think thts it...

Peter.

"John L." <jl*****@forcen et.org> schreef in bericht
news:2c******** *************** ***@posting.goo gle.com...
Hello all, thanks in advance for your help.

I have a table that contains a smallint primary key that is auto
incremented. I would like to start this table's seed value at 1000. I
thought that I could do this...

ALTER TABLE `servers` CHANGE `server_id` `server_id` SMALLINT( 4 )
DEFAULT '1000' NOT NULL AUTO_INCREMENT

But that does not seem to work.

Could anyone shed some light on how I can change the start value of an
auto increment integer?

Jul 20 '05 #2
Hi there... im not that good at this but seems to me that u use: DEFAULT
'1000' by AUTO_INCREMENT , i think thats wrong a auto_increment cant have
default value's...

I can be wrong but i think thts it...

Peter.

"John L." <jl*****@forcen et.org> schreef in bericht
news:2c******** *************** ***@posting.goo gle.com...
Hello all, thanks in advance for your help.

I have a table that contains a smallint primary key that is auto
incremented. I would like to start this table's seed value at 1000. I
thought that I could do this...

ALTER TABLE `servers` CHANGE `server_id` `server_id` SMALLINT( 4 )
DEFAULT '1000' NOT NULL AUTO_INCREMENT

But that does not seem to work.

Could anyone shed some light on how I can change the start value of an
auto increment integer?

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1606
by: Christopher Li | last post by:
I am surprised to find out the mmap module in python always mmap from offset 0. So I just hack up some patch to allow it accept offset arguments. So here it is. Chris Add optional offset argument to mmap module.
24
2177
by: Christopher Benson-Manica | last post by:
Is there anything wrong with my attempt (below) at implementing something resembling a smart pointer? template < class T > class SmartPointer { private: T *t; public:
4
2552
by: Gactimus | last post by:
Here is a program that encodes and decodes a text file. What I need to do is write a C++ program that requests 3 different file names. One filename is for the source file to be encoded, another is the name of the 'encoded' output file, and the final filename is an offset file. On a character by character basis, the program needs to look at the...
0
5762
by: D. Dante Lorenso | last post by:
I need to know that original number of rows that WOULD have been returned by a SELECT statement if the LIMIT / OFFSET where not present in the statement. Is there a way to get this data from PG ? SELECT ... ; ----> returns 100,000 rows
24
10310
by: funkyj | last post by:
PROBLEM STATEMENT: I want to calculate the byte offset of a field with a struct at compile time without instantiating an instance of the struct at runtime AND I want to do this in an ANSI standard compliant fashion. DISCUSSION: Below is a sample program that demonstrates my solution. My questions are:
8
3264
by: shumaker | last post by:
I'm wondering if adding an autonumber primary key will improve the performance of a multiuser access database on a network share. I have a website that lists many tips for improving performance of access, but doesn't mention primary keys. However, it seems logical to think that having no primary key means that when a user updates a record,...
8
5667
by: printline | last post by:
Hello I have a problem which i hope someone can help me with. I have a website where customers can login and their current and previous orders. What i need now is for the customers to look through their orders. I kind of already have a script for this: $recordcount = mssql_num_rows($result); $pagecount = $recordcount / $displayPerPage;...
2
3676
by: =?Utf-8?B?Sm9ubnk=?= | last post by:
I have an ASP.NET 2.0 C# web application that is contacting an Exchange server using WEBDAV. It allows the users to look up appointments for a future date. The problem I have is determining the correct client time zone. Note that Exchange stores everything in UTC time. I am able currently able to use javascript to ask the client what time...
8
3985
by: Thomas Mlynarczyk | last post by:
Hello, I want to split a given string into tokens which are defined by regexes: // example tokens - a bit more complex in real $tokens = array( 'NUMBER' ='~^\d+~', 'NAME' ='~^+~', 'ANY' ='~^.~' ); // make sure there is always a match
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.