select
ProductName,
ProductModel,
ProductUnit
from
T1 A
where
exists
(select 1 from T2 where ProductName=A.ProductName
and ProductModel=A.ProductModel and ProductModel=B.ProductModel
and PYM like 'W%')
ProductName,
ProductModel,
ProductUnit
from
T1 A
where
exists
(select 1 from T2 where ProductName=A.ProductName
and ProductModel=A.ProductModel and ProductModel=B.ProductModel
and PYM like 'W%')
解决方案 »
- 谁能教教我医药销售系统怎么编写
- 关于取最大值
- 各位大哥数据库升级的问题
- select top 1 ???
- 在SQLSERVER中如何检测一个字符串中是否包含另一个字符串
- 请问一下 sql中两个整数相除取余数的函数是什么?
- 大批数据导出时,出现一个莫名其妙的错误,各位高手帮我瞧瞧
- SQL SERVER中,是否可以在SQL语句中使用自定义函数?
- 帮帮我,我要死了大哥大姐们。运用SQL2005和C#做个数据库。教教我到底该怎么做?从何处下手!!!!跪求。。。。。具体如下:
- sql server中怎么得到错误信息。
- 请教一下,我在SQL Server查询分析器里面执行一个存储过程5秒就可以,怎么用ADO在程序中执行有时候总是在等待,始终不返回,还没有错误返
- 一个表联接的问题
ProductName,
ProductModel,
ProductUnit
from
T1 A,T2 B
where A.ProductName=B.ProductName and
A.ProductModel=B.ProductModel and
A.ProductUnit=B.ProductUnit and
B.PYM like 'W%'
group by ProductName,ProductModel,ProductUnit
having count(*)>1
ProductName,
ProductModel,
ProductUnit
from
T1 A,T2 B
where A.ProductName=B.ProductName and
A.ProductModel=B.ProductModel and
A.ProductUnit=B.ProductUnit and
B.PYM like 'W%'
group by ProductName,ProductModel,ProductUnit
having count(*)>=1
from T1,T2
where T1.ProductName = T2.ProductName and
T1.ProductModel = T2.ProductModel and
T1.ProductUnit = T2.ProductUnit and
T2.PYM like 'W%'