Help how to get the last insert ID in sql

Hi,
Can anyone help with how to call the last value of a insert ID in sql.
using a php…
Note:
is use mssql not mysql.
Thanks.

$sql = “insert into… values(…); select @@identity;”;