直接在sql server managment 中操作。
8 个解决方案
#1
可以,用BCP导入
#2
让别人写个循环程序,然后你闭着眼睛调用程序而自欺欺人地认为“我没有使用循环语句”,这就行了!?
#3
为了技术而技术,何必呢?
#4
有把一个表的数据插入相同表的。。。。
#5
insert into 表(星座)
select '双鱼' union select '天秤'
select '双鱼' union select '天秤'
#6
楼上正解
#7
++
#8
insert into .. select.
if object_id('DVD') is not null drop table DVD
create table DVD(ID int,name nvarchar(100),price int, url nvarchar(100),addtime datetime)
insert into DVD
select 1,'FCWR',100,'pic1.jpg','2010-09-16' union all
select 2,'TSDZ',200,'pic2.jpg','2010-09-16' union all
select 3,'XYJ',300,'pic3.jpg','2010-09-16'
if object_id('Type') is not null drop table Type
create table Type(id int,name nvarchar(50),addtime datetime)
insert into Type
select 1,'KH','2010-09-16' union all
select 2,'ZN','2010-09-16' union all
select 3,'XJ','2010-09-16' union all
select 4,'DH','2010-09-16'
if object_id('Actor') is not null drop table Actor
create table Actor(id int,name nvarchar(50),addtime datetime)
insert into Actor
select 1,'XF','2010-09-16' union all
select 2,'GY','2010-09-16' union all
select 3,'ZL','2010-09-16'
if object_id('GLB') is not null drop table GLB
create table GLB(ID int, name nvarchar(100), price int, type nvarchar(100), Actor nvarchar(100), picurl nvarchar(100), addtime datetime)
insert into GLB
select 1, 'FCWR', 100 ,'XJ', 'GY', 'pic1.jpg', '2010-09-16' union all
select 2, 'TSDZ', 200 ,'ZN', 'XF', 'pic2.jpg', '2010-09-16' union all
select 3, 'XYJ', 300 ,'KH', 'ZL', 'pic3.jpg', '2010-09-16'
#1
可以,用BCP导入
#2
让别人写个循环程序,然后你闭着眼睛调用程序而自欺欺人地认为“我没有使用循环语句”,这就行了!?
#3
为了技术而技术,何必呢?
#4
有把一个表的数据插入相同表的。。。。
#5
insert into 表(星座)
select '双鱼' union select '天秤'
select '双鱼' union select '天秤'
#6
楼上正解
#7
++
#8
insert into .. select.
if object_id('DVD') is not null drop table DVD
create table DVD(ID int,name nvarchar(100),price int, url nvarchar(100),addtime datetime)
insert into DVD
select 1,'FCWR',100,'pic1.jpg','2010-09-16' union all
select 2,'TSDZ',200,'pic2.jpg','2010-09-16' union all
select 3,'XYJ',300,'pic3.jpg','2010-09-16'
if object_id('Type') is not null drop table Type
create table Type(id int,name nvarchar(50),addtime datetime)
insert into Type
select 1,'KH','2010-09-16' union all
select 2,'ZN','2010-09-16' union all
select 3,'XJ','2010-09-16' union all
select 4,'DH','2010-09-16'
if object_id('Actor') is not null drop table Actor
create table Actor(id int,name nvarchar(50),addtime datetime)
insert into Actor
select 1,'XF','2010-09-16' union all
select 2,'GY','2010-09-16' union all
select 3,'ZL','2010-09-16'
if object_id('GLB') is not null drop table GLB
create table GLB(ID int, name nvarchar(100), price int, type nvarchar(100), Actor nvarchar(100), picurl nvarchar(100), addtime datetime)
insert into GLB
select 1, 'FCWR', 100 ,'XJ', 'GY', 'pic1.jpg', '2010-09-16' union all
select 2, 'TSDZ', 200 ,'ZN', 'XF', 'pic2.jpg', '2010-09-16' union all
select 3, 'XYJ', 300 ,'KH', 'ZL', 'pic3.jpg', '2010-09-16'