Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Display Last Row


Message #1 by aps@i... on Fri, 11 Oct 2002 06:19:15
Hi,

I need to get a web page to display only the last row that was added to a 
table. Can anyone help me with the syntax for SQLSERVER7?

Thanks

Andrew
Message #2 by "Ken Schaefer" <ken@a...> on Mon, 14 Oct 2002 12:55:45 +1000
SELECT
    TOP 1 Field1, Field2
FROM
    Table1
ORDER BY
    MyOrderByField DESC

You need to have some field in the database that you are doing to use to
indicate what was the "last record that was added"

Chers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: <aps@i...>
To: "ASP Databases" <asp_databases@p...>
Sent: Friday, October 11, 2002 6:19 AM
Subject: [asp_databases] Display Last Row


: Hi,
:
: I need to get a web page to display only the last row that was added to a
: table. Can anyone help me with the syntax for SQLSERVER7?
:
: Thanks
:
: Andrew


  Return to Index