下面这条SQL语句缺少右括号吗
SELECT*FROMtb_infoiWHERE(info_type=2)AND(info_state='1')AND(info_payfor='0')and(ROWNU...
SELECT * FROM tb_info i WHERE (info_type = 2) AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) AND (info_date < (SELECT MIN(info_date) FROM (SELECT info_date FROM tb_info WHERE (info_type = i.info_type) AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) ORDER BY info_date DESC) AS mindate)) ORDER BY info_date DESC
这条SQL语句,我检查了遍也没发现缺少右括号,但是系统一直报缺少右括号异常,都要崩溃了,求求各位高手帮我看一下,指教指教,谢了!!!我是新注册的,所以,没有悬赏分,恳求各位高手一定要帮帮我呀,我将万分感激!!! 展开
这条SQL语句,我检查了遍也没发现缺少右括号,但是系统一直报缺少右括号异常,都要崩溃了,求求各位高手帮我看一下,指教指教,谢了!!!我是新注册的,所以,没有悬赏分,恳求各位高手一定要帮帮我呀,我将万分感激!!! 展开
3个回答
展开全部
不是少括号,这样就好了.去掉AS mindate 或 AS 就好了
SELECT * FROM tb_info i WHERE (info_type = 2) AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) AND (info_date < (SELECT MIN(info_date) FROM (SELECT info_date FROM tb_info WHERE (info_type = i.info_type) AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) ORDER BY info_date DESC) mindate)) ORDER BY info_date DESC
SELECT * FROM tb_info i WHERE (info_type = 2) AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) AND (info_date < (SELECT MIN(info_date) FROM (SELECT info_date FROM tb_info WHERE (info_type = i.info_type) AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) ORDER BY info_date DESC) mindate)) ORDER BY info_date DESC
展开全部
SELECT * FROM tb_info i
WHERE (info_type = 2) AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) AND (info_date < (SELECT MIN(info_date) FROM (SELECT info_date FROM tb_info WHERE (info_type = i.info_type)》 AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) ORDER BY info_date DESC) AS mindate)) ORDER BY info_date DESC
是不是我插入书名号的地方
WHERE (info_type = 2) AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) AND (info_date < (SELECT MIN(info_date) FROM (SELECT info_date FROM tb_info WHERE (info_type = i.info_type)》 AND (info_state = '1') AND (info_payfor = '0') and (ROWNUM<=3) ORDER BY info_date DESC) AS mindate)) ORDER BY info_date DESC
是不是我插入书名号的地方
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
(info_date < (SELECT MIN(info_date)
少了不是一个
少了不是一个
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询