永发信息网

SQL server 2000 中 关于sellect 语句

答案:2  悬赏:0  手机版
解决时间 2021-04-28 15:07
  • 提问者网友:送舟行
  • 2021-04-27 14:50

sql="select Product.*, TypeName.TypeName from Product, TypeName where Product.type = TypeName.type";
sql="select Product.*, StoreName.storename from Product, StoreName where Product.storeid = StoreName.storeid";

这两个语句怎么写在一起?

最佳答案
  • 五星知识达人网友:長槍戰八方
  • 2021-04-27 15:47

select Product.*, TypeName.TypeName,StoreName.storename from Product, TypeName where Product.type = TypeName.type and Product.storeid = StoreName.storeid


或者 select Product.*, TypeName.TypeName,StoreName.storename from Product


inner join TypeName on Product.type = TypeName.type


inner join StoreName on Product.storeid = StoreName.storeid

全部回答
  • 1楼网友:玩家
  • 2021-04-27 17:21

select Product.*, TypeName.TypeName,StoreName.storename from Product, StoreName,TypeName where Product.type = TypeName.type and Product.storeid = StoreName.storeid

这样。。在一起了吧

我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯