I have a table where I do only INSERT operations.
I'd like to uniquely identify these transactio operations through a unique default value (I could do some sequentially INSERT in a transaction that i want to identify with a same id). Example:
BEGIN
INSERT INTO Table_Example (Id, Value)
VALUES (1,'TEST'), (2,'TEST 2'), (3,'TEST 3)
INSERT INTO Table_Example (Id, Value)
VALUES (4,'TEST 4'), (5,'TEST 5'), (6,'TEST 6)
END
Result in Table_Example (Session_Id has been set as i'd like to do)
Id | Value | Session_Id
1 TEST sakmfnsakjnfms-jkfhsajfs-1
...
6 TEST 6 sakmfnsakjnfms-jkfhsajfs-1
this can be accomplished through such a function or is there any best practices?