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. Database & SysAdmin
  3. Database
  4. Regarding Sql server

Regarding Sql server

Scheduled Pinned Locked Moved Database
databasesql-serversysadmintutorial
4 Posts 2 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.
  • P Offline
    P Offline
    Praveen029
    wrote on last edited by
    #1

    Hi, Please send me how to get last 10 records in a table( There is no index on table)

    B 1 Reply Last reply
    0
    • P Praveen029

      Hi, Please send me how to get last 10 records in a table( There is no index on table)

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      select top 10 * from tablename order by [id] desc


      I Love SQL

      P 1 Reply Last reply
      0
      • B Blue_Boy

        select top 10 * from tablename order by [id] desc


        I Love SQL

        P Offline
        P Offline
        Praveen029
        wrote on last edited by
        #3

        Hi I mean to say newly inserted records. i.e Suppose a table have 1000 records.I need to retrieve 991 to 1000 records.

        B 1 Reply Last reply
        0
        • P Praveen029

          Hi I mean to say newly inserted records. i.e Suppose a table have 1000 records.I need to retrieve 991 to 1000 records.

          B Offline
          B Offline
          Blue_Boy
          wrote on last edited by
          #4

          If you have column named ID which is autonumber then my query which i posted before works


          I Love SQL

          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