[gameprogrammer] Re: Slightly offtopic: SQL Command
- From: "Alan Wolfe" <alan.wolfe@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Mon, 30 Oct 2006 19:22:37 -0800
if you know that the maximum id is 8 before going in and then afterwords its
11, how do you know which ID number is the one that YOU were assigned?
The answer is you can't so unfortunately that wont work ):
On 10/30/06, Mikael Eriksson <mikael_miffe_eriksson@xxxxxxxx> wrote:
On Tue, Oct 31, 2006 at 02:24:46PM +1300, Jake Briggs wrote:
> Which database? Serial is a sqlserver thing isn't it? You can't reliably
> do this sort of thing on sql server 2003 (I think that's the right
> version). My solution was convoluted and annoying, involving a dummy
> table to simulate a sequence (like a sequence from postgres) and making
> sure to keep the transaction atomic.
Could't you get the ids before and after the insert, and do somekind of
diff?
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Laurence Grant
- References:
- [gameprogrammer] Gaming industry - how prevalent?
- From: Alan Wolfe
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Casey O'Donnell
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Alan Wolfe
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Agha Usman Ahmed
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Chris Nystrom
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Enrico Zschemisch
- [gameprogrammer] Slightly offtopic: SQL Command
- From: Kevin Jenkins
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Jake Briggs
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Mikael Eriksson
Other related posts:
- » [gameprogrammer] Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
- » [gameprogrammer] Re: Slightly offtopic: SQL Command
On Tue, Oct 31, 2006 at 02:24:46PM +1300, Jake Briggs wrote: > Which database? Serial is a sqlserver thing isn't it? You can't reliably > do this sort of thing on sql server 2003 (I think that's the right > version). My solution was convoluted and annoying, involving a dummy > table to simulate a sequence (like a sequence from postgres) and making > sure to keep the transaction atomic.
Could't you get the ids before and after the insert, and do somekind of diff?
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Laurence Grant
- [gameprogrammer] Gaming industry - how prevalent?
- From: Alan Wolfe
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Casey O'Donnell
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Alan Wolfe
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Agha Usman Ahmed
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Chris Nystrom
- [gameprogrammer] Re: Gaming industry - how prevalent?
- From: Enrico Zschemisch
- [gameprogrammer] Slightly offtopic: SQL Command
- From: Kevin Jenkins
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Jake Briggs
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Mikael Eriksson