sql
-
how can find out the last value of table
-
how can find out the last value of table
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/
-
how can find out the last value of table
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.
-
how can find out the last value of table