Bulk increment sequence within MS SQL Server -


postgres , oracle include generate_series/connect command allow incrementing sequence more 1. have need increment sequence variable amount before row insertion. example in postgres query below:

select nextval('mytable_seq') generate_series(1,3);

what recommended way accomplish in microsoft sql server?

there stored procedure call can use. alternatively, set sort of while loop calls next value for multiple times , caches them use later.


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -