当前位置: 代码迷 >> ASP >> sql语句如何写
  详细解决方案

sql语句如何写

热度:233   发布时间:2012-02-17 17:50:42.0
sql语句怎么写
想以表b的某个条件查询表a数据
A
id   name   userid   class

B
id   userid   chengji  

与B的chengji为条件查询   A   的数据


------解决方案--------------------
chengji int 型:
select A.* from A,B where A.userid=B.userid and chengji=XXXX

chengji varchar 型:
select A.* from A,B where A.userid=B.userid and chengji= 'XXXX '
------解决方案--------------------
up
------解决方案--------------------
1楼正解
  相关解决方案