Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2006, 06:09 AM
Registered User
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default autoincrementing a column

suppose there are two tables
Schools(school_id primary key with autocrement)
Students(school_id and student_id both primary key)student_id(autoincrementing)
Generally , I found
schools
school_id school_name ...
1 a
2 b
 students
school_id student_id ...
1 1
1 2
2 3
3 4

but i want
 (using auto-incrementing starting from beginning for different
school_id, but incrementing auto for same id)

school_id student_id
1 1
1 2
2 1
3 1





Similar Threads
Thread Thread Starter Forum Replies Last Post
previous column & next column ct Excel VBA 4 August 19th, 2005 04:50 AM
print column by column ct Excel VBA 1 August 8th, 2005 07:21 AM
template column and bound column hidayah ASP.NET 1.x and 2.0 Application Design 1 April 9th, 2005 03:50 PM
how to make column of table 1 = to column of table gilgalbiblewheel Classic ASP Databases 4 October 11th, 2004 11:57 PM
Compare two Items of data(in column A and column B ever Excel VBA 6 February 13th, 2004 02:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.