Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. sql

sql

Scheduled Pinned Locked Moved ASP.NET
database
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ritasaumya
    wrote on last edited by
    #1

    how can find out the last value of table

    V M C 3 Replies Last reply
    0
    • R ritasaumya

      how can find out the last value of table

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      People are not Going to be patient as am to you. When you post a Qustion you need to be specific if its an Identity Field you can do it like this

      SELECT MAX(ID) AS LastID FROM mytable

      or read this http://blog.sqlauthority.com/2007/03/25/sql-server-identity-vs-scope_identity-vs-ident_current-retrieve-last-inserted-identity-of-record/[^] Dont Forget to Google Next Time

      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

      1 Reply Last reply
      0
      • R ritasaumya

        how can find out the last value of table

        M Offline
        M Offline
        Manas Bhardwaj
        wrote on last edited by
        #3

        select Top 1 * from table order by id Desc

        Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        1 Reply Last reply
        0
        • R ritasaumya

          how can find out the last value of table

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          This has nothing to do with ASP.NET, and it shows you have no idea at all what you're doing. You should start with a basic book.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups