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 Oct 16, 2008 | 04:31 PM
  #1  
ChefDude's Avatar
ChefDude
Thread Starter
Scooby Regular
 
Joined: Aug 2005
Posts: 4,291
Likes: 0
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?
Reply
Old Oct 16, 2008 | 06:57 PM
  #2  
spectrum48k's Avatar
spectrum48k
Scooby Regular
 
Joined: Feb 2006
Posts: 2,519
Likes: 0
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;
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Makalu
ScoobyNet General
16
Sep 7, 2002 12:59 PM
ChrisB
Non Scooby Related
4
May 15, 2002 08:51 AM
Puff The Magic Wagon!
Computer & Technology Related
3
Feb 2, 2002 04:04 PM
ChrisB
Insurance
1
Oct 3, 2001 06:43 PM
ChrisB
Non Scooby Related
3
May 15, 2001 12:12 PM




All times are GMT +1. The time now is 01:37 PM.