I am trying to get the max value of auto identity column with table name and column name. Below is the query I am using which GIVES me table and column name BUT NOT the MAX value.
tables.name As TableName,
columns.name as ColumnName
FROM sys.tables tables
JOIN sys.columns columns
THis is a separate query for just 1 to get the MAX value of columns found in above query...I am unable to combine both and feel there should be a way...please let me know. Thanks!
select max(COL NAME) from dbo.TBLNAME;