I am trying to get the max of a int column and assign it to a variable to do a insert in that table with the new key. here is my code.. my question is how do I set the @trans_seq_num with what the column name?
declare @trans_seq_num int
SELECT max(trans_seq_num) FROM pv_trans
SET @trans_seq_num =
declare @trans_seq_num int
SELECT max(trans_seq_num) FROM pv_trans
SET @trans_seq_num =