Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

sql question...

Thread Tools
 
Search this Thread
 
Old 16 October 2008, 04:31 PM
  #1  
ChefDude
Scooby Regular
Thread Starter
 
ChefDude's Avatar
 
Join Date: Aug 2005
Posts: 4,290
Likes: 0
Received 0 Likes on 0 Posts
Default sql question...

Anyone know how i retrieve an auto incrementing number in a SQL query

select [auto incrementing int], a,b from blah

1, a data, b data
2, a data, b data
3, a data, b data
4, a data, b data
...

I know i can create a column with an identity syntax, but i don't wanna.

Any ideas?
Old 16 October 2008, 06:57 PM
  #2  
spectrum48k
Scooby Regular
 
spectrum48k's Avatar
 
Join Date: Feb 2006
Posts: 2,519
Likes: 0
Received 0 Likes on 0 Posts
Default

here's my code for one of the MySQL dbases...

CREATE TABLE `test` (
`auto` int(11) NOT NULL auto_increment,
PRIMARY KEY (`auto`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Makalu
ScoobyNet General
16
07 September 2002 12:59 PM
ChrisB
Non Scooby Related
4
15 May 2002 08:51 AM
Puff The Magic Wagon!
Computer & Technology Related
3
02 February 2002 04:04 PM
ChrisB
Insurance
1
03 October 2001 06:43 PM
ChrisB
Non Scooby Related
3
15 May 2001 12:12 PM



Quick Reply: sql question...



All times are GMT +1. The time now is 08:10 AM.