Wednesday, July 16, 2014

How to Insert multiple values using a single statement tip #26


It is very interesting how to insert multiple values with a single statement.

Lets understand this with the help of below example.

Suppose you have a Country table and you want to insert seed (initial values) then you can write those statement like below



Now same values can be inserted with another one of the interesting way


So in the above snap you have seen that we can use either Values statement or UNION to insert multiple values with single Insert statement.

Enjoy !!!



No comments:

Post a Comment