Skip to content
Advertisement

How to use a for loop to insert multiple records in a database table

I have simplified my problem into the following code:

I am trying to get 10 records in the table, with each incrementing by one in the ‘x’ field.

However, all I see is:

Here is what I see

Please advise. Thank you.

Advertisement

Answer

Here is how you can do that.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement