开发者

Insert into a table using a view

I have some data in a view which I want to insert into a table (same table schema) what's the easiest, cleanes开发者_如何转开发t way to do it.


Insert Into dbo.MyTable (Col1, Col2,...)
Select Col1, Col2, ...
From dbo.MyView


if you want to insert the entire column then you can do like

   insert into table_name
   select * from view_name


insert into mytable(c1, c2, c3, ...)
select c1, c2, c3, ... from myview
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜