simple SQL Statement could do that in case that the column was identity columnI need to check the last value of that column , and see if it has exceeded its max value ( just a number ).
/* Return The Last inserted Identity Value On Current Session */
select @@IDENTITY
/*Another Method*/
/* Return The Last inserted Identity Value In ALL scopes And Sessions */
select IDENT_CURRENT('TestIdentity')
you mean to copy the table with another name or you mean something elsei need to get a table name and column name from one table X and use this table name to get in to table Y and select there the column i got from table X