DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Steve Guest

    how do you select an autonumber datatype when inserting a new row


    Does anyone know how to select an incrementing datatype while inserting a
    new record using one sql statement?

  2. #2
    Mehdi Mousavi Guest

    Re: how do you select an autonumber datatype when inserting a new row

    Take the row that contains the greatest autonumber, by calling
    MAX(yourAutoNoField)
    or
    Take the newest row that is inserted to the table, by processing its date of
    insert

    HTH,
    Mehdi
    --
    Got a question about modems? Take a look at http://www.modemmania.com
    "The important thing is not to stop questioning. -- Albert Einstein"


    "Steve" <steve_woodcock@med3000.com> wrote in message
    news:3a1be8e7@news.devx.com...
    >
    > Does anyone know how to select an incrementing datatype while inserting a
    > new record using one sql statement?




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links