I am new to ASP.NET and I want to move data from database table to another table in the same database. I searched a lot but I didn't find such thing in ASP.NET MVC. I have a Table 1 and Table 2 in my ABC
database and I want to move data from Table 1 to Table 2. I do not have much knowledge to do this thing have you know any blog that can solve my problem. I tried a lot but did not find.
我是ASP.NET新手,我想将数据从数据库表移动到同一数据库中的另一个表。我搜索了很多,但我没有在ASP.NET MVC中找到这样的东西。我在ABC数据库中有一个表1和表2,我想将数据从表1移到表2.我没有太多的知识去做这件事你知道任何博客可以解决我的问题。我尝试了很多,但没有找到。
http://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-code-based-migrations-walkthrough.aspx
Entity Framework CodeFirst Move Data From One table To another
实体框架CodeFirst将数据从一个表移动到另一个表
1 个解决方案
#1
1
In order to insert data from one table (Database1) to another table(DataBase2).
为了将数据从一个表(Database1)插入另一个表(DataBase2)。
Check following code:
检查以下代码:
Insert into Database2.dbo.Table1 Select * from Database1.dbo.Table1
With due respect to sir ramiramilu :)
适当尊重先生ramiramilu :)
#1
1
In order to insert data from one table (Database1) to another table(DataBase2).
为了将数据从一个表(Database1)插入另一个表(DataBase2)。
Check following code:
检查以下代码:
Insert into Database2.dbo.Table1 Select * from Database1.dbo.Table1
With due respect to sir ramiramilu :)
适当尊重先生ramiramilu :)