select level01 from score01
where (select score from student01 where sname='張三')>minscore
and (select score from student01 where sname='張三')<maxscore;
大神,sql陳述句應該怎么寫呢?實在不會呢,求大神教我!
uj5u.com熱心網友回復:
select level01
from score01
where (select score from student01 where sname = '張三') between minscore and
maxscore
uj5u.com熱心網友回復:
親,你是在資料庫里寫的嗎?
我試了,不對!
uj5u.com熱心網友回復:
select level01 from score01,student01
where (student01.score>minscore and student01.score<maxscore)
and student01.sname='張三';
這個能查出來,可是結果是兩條記錄!誰能優化一下!
uj5u.com熱心網友回復:
select level01
from score01
where (select score from student01 where sname = '張三') between minscore and
maxscore
親,你是在資料庫里寫的嗎?
我試了,不對!
select level01 from score01,student01
where (student01.score>minscore and student01.score<maxscore)
and student01.sname='張三';
這個能查出來,可是結果是兩條記錄!誰能優化一下!
我執行了下,查詢只有一條資料:良
uj5u.com熱心網友回復:
select level01 from score01,student01
where student01.score>=minscore and student01.score<maxscore
and student01.sname='張三';
uj5u.com熱心網友回復:
select level01
from score01
where (select score from student01 where sname = '張三') between minscore and
maxscore
親,你是在資料庫里寫的嗎?
我試了,不對!
select level01 from score01,student01
where (student01.score>minscore and student01.score<maxscore)
and student01.sname='張三';
這個能查出來,可是結果是兩條記錄!誰能優化一下!
我執行了下,查詢只有一條資料:良
如圖,我查的是兩條
不過,可以在level01前加distinct,回傳結果就是一條
uj5u.com熱心網友回復:
select
(select sc.level01 from score01 sc where sc.minscore <= score and sc.maxscore > score )
from class01 c1,student01 s1 where c1.classno = s1.classno and s1.sname = '張三' ;
uj5u.com熱心網友回復:
select
(select sc.level01 from score01 sc where sc.minscore <= s1.score and sc.maxscore > s1.score )
from class01 c1,student01 s1 where c1.classno = s1.classno and s1.sname = '張三' ;
**桔妹導讀:**深耕人工智能領域,致力于探索AI讓出行更美好的滴滴AI Labs再次斬獲國際大獎,這次獲獎的專案是什么呢?一起來看看詳細報道吧! 近日,由國際計算語言學協會ACL(The Association for Computational Linguistics)舉辦的世界最具影響力的機器 ......
我們經常在資料庫中使用 LIKE 運算子來完成對資料的模糊搜索,LIKE 運算子用于在 WHERE 子句中搜索列中的指定模式。 如果需要查找客戶表中所有姓氏是“張”的資料,可以使用下面的 SQL 陳述句: SELECT * FROM Customer WHERE Name LIKE '張%' 如果需要 ......
關于MySQL的二進制日志(binlog),我們都知道二進制日志(binlog)非常重要,尤其當你需要point to point災難恢復的時侯,所以我們要對其進行備份。關于二進制日志(binlog)的備份,可以基于flush logs方式先切換binlog,然后拷貝&壓縮到到遠程服務器或本地服務器 ......