> At first i also try to do it like that but it seems the function will > became long and more complex to me
Probably. But calling it with size 100 should result in the same behavior, so it is really just an extension of the preceeding one? Or am I missing something?
Specifying table data using single value insert statement and user specified values insert statement
have enough deference that demand to be separate function and they are not the same thing that should implement
with the same function. Regarding code duplication i think the solution is making those code separate function