帮我看看这个SQL语句怎么写。。。因为关系到表的外键问题。。 select a.* from 采购详细表 a inner join 采购信息表 b on a.buyID=b.buyIDwhere a.goodsID='A' and b.flag=1 and b.flag2=1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select b.Priceb.Countfrom 采购信息表 as a ,采购详细表 as b where a.flag=1 and a.flag2=1 and b.BuyId=a.BuyId and b.GoodsId='A' select a.* from 采购详细表 a , 采购信息表 b where a.buyID=b.buyIDand a.goodsID='A' and b.flag=1 and b.flag2=1 select a.* , b.*from 采购信息表 a,采购详细表 bwhere a.flag = 1 and a.flag2 = 1 and b.id = 'A' and a.BuyId = b.BuyId select a.*,b.price,b.count from 采购信息表 a inner join 采购详细表 b on a.BuyId=b.BuyId where a.flag=1 and a.flag=2 and b.商品ID='A' 搞定了,刚发了贴没回来看,发现这里的人都很热情啊我现在还想问下一个插入的问题,比如我想同时给2张表插入数据,要怎么写呢?比如写个Goodid=10的数据以前没写过有外键的SQL现在写起来比较困难,求帮忙 跨数据库,多数据库如何使用事务处理? 这段sql怎么写? date类型到varchar 存储过程的作用是什么? 为什么要这样做呢? 大家来讨论一下! ucmal病毒的SQL,我该如何解决? 怎样进行字符串的替换 ASP调用有输出参数的存储过程问题?输出参数返回的值没有 直接在数据库表里面复制数据的时候出现"RPC服务器不可用"的错误提示,请问这是什么问题!谢谢! 能否构造不select表中的某几个字段的Select语句?? 同表同字段多条件查询 sql2005 导出数据库结构脚本时提示错误 大家能看出来这个SQL语句有什么错误不?
b.Price
b.Count
from 采购信息表 as a ,采购详细表 as b
where a.flag=1 and a.flag2=1 and b.BuyId=a.BuyId and b.GoodsId='A'
a.*
from
采购详细表 a , 采购信息表 b
where
a.buyID=b.buyID
and
a.goodsID='A' and b.flag=1 and b.flag2=1
from 采购信息表 a,采购详细表 b
where a.flag = 1 and a.flag2 = 1 and b.id = 'A' and a.BuyId = b.BuyId
select a.*,b.price,b.count from 采购信息表 a inner join 采购详细表 b on a.BuyId=b.BuyId where a.flag=1 and a.flag=2 and b.商品ID='A'