table1
字段: id username userpass type
101 sun sun yy
102 sun sun yy 104 max sun yy 105 po po uu
106 po po uu 109 789 po uu
table2
字段: pID id connent
a01 101 北京
a02 101 上海
a03 101 河北
a04 102 厦门
a05 104 广东
a06 105 瑞典
a07 106 f1
a08 109 合肥
如何将内容重复(id不考虑)的列合为一列,同时添加新的列newID, 以便以后查出合并后的字段。
实现后的效果:
table1
字段: id username userpass type newID 101 sun sun yy 1001
105 po po uu 1002
table2:
pID id connent newID
a01 101 北京 1001
a02 101 上海 1001
a03 101 河北 1001
a04 102 厦门 1001 a05 104 广东 a06 105 瑞典 1002
a07 106 f1 1002
a08 109 合肥
字段: id username userpass type
101 sun sun yy
102 sun sun yy 104 max sun yy 105 po po uu
106 po po uu 109 789 po uu
table2
字段: pID id connent
a01 101 北京
a02 101 上海
a03 101 河北
a04 102 厦门
a05 104 广东
a06 105 瑞典
a07 106 f1
a08 109 合肥
如何将内容重复(id不考虑)的列合为一列,同时添加新的列newID, 以便以后查出合并后的字段。
实现后的效果:
table1
字段: id username userpass type newID 101 sun sun yy 1001
105 po po uu 1002
table2:
pID id connent newID
a01 101 北京 1001
a02 101 上海 1001
a03 101 河北 1001
a04 102 厦门 1001 a05 104 广东 a06 105 瑞典 1002
a07 106 f1 1002
a08 109 合肥
解决方案 »
- 请SqlDataAdapter填充DataTable
- 问个截断数组最有效率的办法
- c#读文件,求解答
- winform listview 如何在点击时取得该点击位置所属的列的columnheader的name值
- HttpWebResponse 与 webBrowser控件组合使用的一个小问题求教?
- dropdownlist问题?
- 求教关于翻页PageIndexChanged事件的问题~!急
- 如何得到当前操作系统下所有正在运行的进程名称或ID呢?就像任务管理器一样。
- xp下作的c#程序,一个exe文件,一个access数据库,拿到2000下却出现访问不了数据库的情况!很急!
- 关于反射的一个简单的问题。请各位前辈指导一下。
- 新手问题
- C#注释 里的怪事
alter table #B add [newId] int IDENTITY (1001, 1) NOT NULL
select * from #B