Multiple Value Insert In A Single Query
Hello readers, Below is the query to inset multiple values in a Table name items in a single INSERT statement.
First Create a table
CREATE TABLE items(id INT, itemname VARCHAR(30))
GO
INSERT INTO items(id,itemname) VALUES (1, 'Pen'),(2,'Pencil'),(3,'Rubber'),(1,'Scale'),(1,'Copy'),
(3,'Box'),(2,'Compas'),(4,'Stapler'),(5,'Paper'),(6,'Ink')
GO
SELECT * FROM items
Query is simple. Not too complicated.
Just add new values after first by placing comma , and type next values.
Good One.!!!!
ReplyDeletecan u plz post the code for Image uploader.. which store Image Path in DB and shows directly on the form(In Image Control)
ReplyDeleteThanx
Topic added to blog with name File Upload under Asp.Net Tips.
ReplyDelete