一表两段查询 ( 积分: 50 )

  • 主题发起人 主题发起人 TonSon
  • 开始时间 开始时间
T

TonSon

Unregistered / Unconfirmed
GUEST, unregistred user!
谢谢。<br>SELECT&nbsp;*&nbsp;FROM&nbsp;表<br>WHERE&nbsp;(日期&nbsp;BETWEEN&nbsp;'2005-09-01'&nbsp;AND&nbsp;'2005-10-01')&nbsp;AND&nbsp;(编号='0005')&nbsp;OR<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(日期&nbsp;BETWEEN&nbsp;'2007-09-01'&nbsp;AND&nbsp;'2007-10-01')<br>这个正确了。谢谢两位。
 
SELECT&nbsp;*&nbsp;FROM&nbsp;表<br>WHERE&nbsp;编号='0005'&nbsp;and&nbsp;(日期&nbsp;BETWEEN&nbsp;'2005-09-01'&nbsp;AND&nbsp;'2005-10-01'&nbsp;OR<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日期&nbsp;BETWEEN&nbsp;'2007-09-01'&nbsp;AND&nbsp;'2007-10-01')
 
谢谢s00000000001&nbsp;!
 
s00000000001是对的。谢谢!
 
后退
顶部