i would create a stored procedure in which a declare a variable, lets say vID and then assign it the value of table1_sequence.nextval. Then use the value of vID in your insert statement.
If you don't use the vID value besides the insert, you can also use the table1_sequence.nextval directly in your sql statement:
Code:
insert into
table1(col1)
values(table1_sequence.nextval)
If you get the table1_sequence after the insert, you are not sure if it's the correct value, because another insert can already have been done.