如何将数据插入表格。
Insert into TEAMS (TEAM_CODE,TEAM_NAME,TEAM_DIVISION,TEAM_CITY,TEAM_STATE,TEAM_COACH,TEAM_STADIUM,TEAM_STAD_CAP)
VALUES
('BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''),
('BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''),
('BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''),
('BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''),
('BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''),
('NEP','New England Patriots','AFC EAST','Foxboro','MA','Bill Belichek','Gillette Stadium','');
我们可以使用一个命令插入多个数据吗?
答案 0 :(得分:0)
Insert into TEAMS (TEAM_CODE,TEAM_NAME,TEAM_DIVISION,TEAM_CITY,TEAM_STATE,TEAM_COACH,TEAM_STADIUM,TEAM_STAD_CAP)
select 'BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''
union select 'BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''
union select 'BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''
union select 'BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''
union select 'BUF','Buffalo bulls','AFC EAST','Buffalo','NY','Doug Marrone','Ralph Wilson Jr.Stadium',''
union select 'NEP','New England Patriots','AFC EAST','Foxboro','MA','Bill Belichek','Gillette Stadium','';