Question: How can I get the @@IDENTITY for a specific table?

I have been doing 

```
select * from myTable 

```

as I assume this sets the scope, from the same window SQL query window in SSMS I then run 

```
select @@IDENTITY as identt

```

It returns identt as null which is not expected since myTable has many entrie in it already..

I expect it to return the next available ID integer.

myTable has a ID column set to Primary key and auto increment.

Answer: 
[IDENT\_CURRENT](http://msdn.microsoft.com/en-us/library/ms175098.aspx) does what you want. But don't.

This is in addition to marc\_s' answer
I've never known @@IDENTITY to be used this way, i've only ever used it to access the ID of a newly inserted record.