数据库问题 [英] problem with database

查看:69
本文介绍了数据库问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有国家/地区表.我想将国家/地区数据复制到另一个国家.例如,印度通过asp.net.india到英国,而英国是国家/地区表mns的国家/地区名称是同一张表.帮助我吗?

I have country table. i want to copy country data to another country.e.g india to england through asp.net.india and england is country name of country table mns same table.. help me?

推荐答案

假定印度的Country_ID = 2,英国的country_ID = 814
您可以根据自己的喜好对其进行编辑

assume that india Country_ID = 2 and England country_ID = 814
this statament update England name with India name you can Edit it as you like

update C1
set C1.Country_Name1 = C2.Country_Name1
   ,C1.Country_Name2 = C2.Country_Name2
from Countrys C1
inner join Countrys C2 on C1.Country_ID = 814 and C2.Country_ID = 2


这篇关于数据库问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆