如何使用Asp.Net代码更新来自另一个表的表比较常见字段 [英] How Do I Update Table From Another Table Comparing Common Fields Using Asp.Net Code
问题描述
从另一个表更新表使用asp.net代码比较常见字段
但< b>不通过文本输入
SqlConnection connAdd = new SqlConnection(Data Source = localhost; Initial Catalog = project; Integrated Security = SSPI);
connAdd.Open();
string mySQLL;
mySQLL =更新报告设置句柄='处理'其中caseid ='+ lblCID.Text +';
SqlCommand cmdAdd = new SqlCommand(mySQLL,connAdd);
cmdAdd.ExecuteNonQuery();
connAdd.Close();
i想要复制已存在于另一个表中的数据..
update table from another table comparing common fields using asp.net code
but not through text entry
SqlConnection connAdd = new SqlConnection("Data Source = localhost; Initial Catalog = project; Integrated Security= SSPI");
connAdd.Open();
string mySQLL;
mySQLL = "Update Report Set handle = 'handled' where caseid='"+lblCID.Text+"'";
SqlCommand cmdAdd = new SqlCommand(mySQLL, connAdd);
cmdAdd.ExecuteNonQuery();
connAdd.Close();
i want to copy data which s already exist in another table..
推荐答案
试试这个:
Try this:
SELECT column_name(s)
INTO newtable [IN externaldb]
FROM existingtable;
这篇关于如何使用Asp.Net代码更新来自另一个表的表比较常见字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!