查询所有符合 表a中的一个字段=表b中的一个字段的子串的SQL语句怎么写? select * from tablea where tablea.flda=tableb.fldb and ... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from table1 where sfzh=(select sfzh from table2) select table1.* from table1,table2where table1.fielda=table2.fieldb; 各路高手给显神通。呵呵,,请看数据库原理---sql介绍。 如果是sqlserver,可以这样写select a.* ,b.* from a,b where a.a1=substring(b.b1,2,10)此语句列出a表的字段a1等于b表中b1字段从第二个字符到第10个字符间的字串的所有记录 如果是sqlserver,可以这样写select a.* ,b.* from a,b where a.a1=substring(b.b1,2,10)此语句列出a表的字段a1等于b表中b1字段从第二个字符到第10个字符间的字串的所有记录 得到两个表中满足条件的所有字段1) select a.*,b.* from a,b where a.x = b.x .....得到A表中满足条件的所有字段2) select * from a where x in ( select x from b)...... 呵呵,忘了删掉了,其实已经解决了,我是ORACLQ+BDE,上面没有对的答案。 select a.* ,b.* from a,b where a.a1=substring(b.b1,Start,Len) 上一个是SqlServer的这一个才是select a.* ,b.* from a,b where a.a1=substr(b.b1,Start,Len) Delphi如何编程实现文件复制、剪切?(不粘贴) TePanel控件的应用 最小化到托盘 怎么写? delphi中$符号是什么意思? 月亮没了,留此存照! ADO调用存储过程如何返回数据集 怎样在数据库中删除dbgrid中选定的记录??急啊!! 如何减少使用全局变量? 请教:怎样分组打印小票? 当formload执行的时候,消息触发了 关于一个控件的使用…… D6操作WORD2K是不是不太灵光?如何动态设置ADO的路径?
where table1.fielda=table2.fieldb;
呵呵,,请看数据库原理---sql介绍。
select a.* ,b.* from a,b where a.a1=substring(b.b1,2,10)
此语句列出a表的字段a1等于b表中b1字段从第二个字符到第10个字符间的字串的所有记录
select a.* ,b.* from a,b where a.a1=substring(b.b1,2,10)
此语句列出a表的字段a1等于b表中b1字段从第二个字符到第10个字符间的字串的所有记录
1) select a.*,b.* from a,b where a.x = b.x .....
得到A表中满足条件的所有字段
2) select * from a where x in ( select x from b)......
这一个才是
select a.* ,b.* from a,b where a.a1=substr(b.b1,Start,Len)