求一SQL,各位救命呀.解决就给分.决不含糊.
两个表 temp 和 temp1
temp表结构:
aa bb
1111 1111
1111 2222
1111 3333
1111 4444
2222 1111
2222 2222
2222 3333
2222 4444
3333 1111
3333 2222
3333 3333
3333 4444
create table temp(aa nvarchar(4),bb nvarchar(4))
insert into temp values('1111','1111')
insert into temp values('1111','2222')
insert into temp values('1111','3333')
insert into temp values('1111','4444')
insert into temp values('2222','1111')
insert into temp values('2222','2222')
insert into temp values('2222','3333')
insert into temp values('2222','4444')
insert into temp values('3333','1111')
insert into temp values('3333','2222')
insert into temp values('3333','3333')
insert into temp values('3333','4444')
temp1表结构
cc bb
1111 2222
1111 3333
1111 4444
2222 1111
2222 3333
2222 4444
3333 1111
3333 2222
3333 4444
create table temp1(cc nvarchar(4),dd nvarchar(4))
insert into temp1 values('1111','2222')
insert into temp1 values('1111','3333')
insert into temp1 values('1111','4444')
insert into temp1 values('2222','1111')
insert into temp1 values('2222','3333')
insert into temp1 values('2222','4444')
insert into temp1 values('3333','1111')
insert into temp1 values('3333','2222')
insert into temp1 values('3333','4444')
返回结果:
1111 1111
2222 2222
3333 3333
也就是说通过SQL返回Temp表里有但Temp1表里没有的记录.
如果不清楚题目的可以加我
QQ:29239212
MSN:jeffery_liao@hotmail.com
谢谢各位了!!
temp表结构:
aa bb
1111 1111
1111 2222
1111 3333
1111 4444
2222 1111
2222 2222
2222 3333
2222 4444
3333 1111
3333 2222
3333 3333
3333 4444
create table temp(aa nvarchar(4),bb nvarchar(4))
insert into temp values('1111','1111')
insert into temp values('1111','2222')
insert into temp values('1111','3333')
insert into temp values('1111','4444')
insert into temp values('2222','1111')
insert into temp values('2222','2222')
insert into temp values('2222','3333')
insert into temp values('2222','4444')
insert into temp values('3333','1111')
insert into temp values('3333','2222')
insert into temp values('3333','3333')
insert into temp values('3333','4444')
temp1表结构
cc bb
1111 2222
1111 3333
1111 4444
2222 1111
2222 3333
2222 4444
3333 1111
3333 2222
3333 4444
create table temp1(cc nvarchar(4),dd nvarchar(4))
insert into temp1 values('1111','2222')
insert into temp1 values('1111','3333')
insert into temp1 values('1111','4444')
insert into temp1 values('2222','1111')
insert into temp1 values('2222','3333')
insert into temp1 values('2222','4444')
insert into temp1 values('3333','1111')
insert into temp1 values('3333','2222')
insert into temp1 values('3333','4444')
返回结果:
1111 1111
2222 2222
3333 3333
也就是说通过SQL返回Temp表里有但Temp1表里没有的记录.
如果不清楚题目的可以加我
QQ:29239212
MSN:jeffery_liao@hotmail.com
谢谢各位了!!
...全文
相关推荐
sql求时间差(XX天XX时XX分XX秒)
sql求时间差(XX天XX时XX分XX秒)select dbo.f_second_Time(datediff(ss,'2009-5-21 10:10:26','2009-7-22 10:19:06')
关于sql中求平均值出现null值的解决方案
关于sql中求平均值出现null值的解决方案.txt"和"注释.txt"可能包含了更详细的解释和示例代码,而"更新说明.txt"则可能记录了这些解决方案的更新和改进。
SQL求比例 qiuqianquan
### SQL 求比例的方法#### 方法一:基于数值求比例当需要计算某一数值字段的总和占全部数值总和的比例时,可以采用以下 SQL 语句实现:```sqlSELECT (CONVERT(decimal
Oracle 11g SQL和PL SQL从入门到精通 pdf格式电子书 下载(一)
谢谢大家的支持,我会陆续上传相关电子书 由于体积较大,本书分两卷压缩,请都下载完再解压!Oracle 11g SQL和PL SQL从入门到精通 pdf格式电子书 下载(一) http:
sql_求比例
sql_求比例


数据库(包含打印,安装,报表)
