Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql insert multiple rows

INSERT INTO MyTable
  ( Column1, Column2, Column3 )
VALUES
  ('John', 123, 'Lloyds Office'), 
  ('Jane', 124, 'Lloyds Office'), 
  ('Billy', 125, 'London Office'),
  ('Miranda', 126, 'Bristol Office');
Comment

how to insert multiple rows in sql

INSERT INTO sales.promotions (
    promotion_name,
    discount,
    start_date,
    expired_date
)
VALUES
    (
        '2019 Summer Promotion',
        0.15,
        '20190601',
        '20190901'
    ),
    (
        '2019 Fall Promotion',
        0.20,
        '20191001',
        '20191101'
    ),
    (
        '2019 Winter Promotion',
        0.25,
        '20191201',
        '20200101'
    );
Code language: SQL (Structured Query Language) (sql)
Comment

Insert Multiple Rows at Once in SQL

INSERT INTO Customers(first_name, last_name, age, country)
VALUES
('Harry', 'Potter', 31, 'USA'),
('Chris', 'Hemsworth', 43, 'USA'),
('Tom', 'Holland', 26, 'UK');
Comment

sql insert multiple rows

INSERT INTO My_Table (FirstName, LastName)
VALUES
    ('Fred', 'Smith'),
    ('John', 'Smith'),
    ('Michael', 'Smith'),
    ('Robert', 'Smith');
Comment

multi row insert

insert into bricks (brick_id, colour)
  select toy_id, colour
  from   toys
  where  toy_id in ( 4, 5 );

select * from bricks
where  brick_id in ( 4, 5 );
Comment

PREVIOUS NEXT
Code Example
Sql :: list databases in sql server 
Sql :: capabilities of sql select statements 
Sql :: sqlite describe table 
Sql :: SQL SERVER microsoft How to Add Column at Specific Location in Table 
Sql :: bigquery routine 
Sql :: flask sqlalchemy session delete 
Sql :: mysql storage engines 
Sql :: mysql match in serialized data 
Sql :: find employee with max salary sql 
Sql :: how to subquey to do not load in live database in 
Csharp :: guid.empty 
Csharp :: ms crm set state request dynamics 365 set state request 
Csharp :: c# hello world program 
Csharp :: how to pause your game unity 
Csharp :: c# get user directory 
Csharp :: loop through an enum c# 
Csharp :: c# exit console 
Csharp :: c# copy file to directory 
Csharp :: unity 2d raycast mouse 
Csharp :: unity on mousewheel down 
Csharp :: c# char to int 
Csharp :: regex for email c# 
Csharp :: how to flip character in unity 2d 
Csharp :: c# random boolean 
Csharp :: xamarin button text lowercase 
Csharp :: write to file c# 
Csharp :: unity print 
Csharp :: how to detect when a player move in unity 
Csharp :: c# string to datetime 
Csharp :: custom editor unity 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =