[gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Jake Briggs <jakbri@xxxxxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Tue, 31 Oct 2006 14:24:46 +1300
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.
Kevin Jenkins wrote:
If I use the SQL command INSERT to insert a row into a table which has
a primary key with the serial property, to automatically generate a
per-row unique ID, how do I get the ID of the thing I just inserted?
Should I immediately query for the newest ID?
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
--
Jacob Briggs
Systems Engineer
Core Technology Limited
Level 1, NZX Centre
11 Cable Street
Wellington
Phone +64 4 801 2252
--
object doAnythingConceivable(string whatToDo, object whatToDoItWith) { .....
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Jake Briggs
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Mikael Eriksson
- 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
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
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
-- Jacob Briggs Systems Engineer
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Jake Briggs
- [gameprogrammer] Re: Slightly offtopic: SQL Command
- From: Mikael Eriksson
- [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