我试图从表中获取数据,而该ID不在另一个表中。我引用了一些代码示例来解决这个问题,但它仍然无法正常工作。我尝试了两种风格。我试过的sql代码如下,请帮助我。感谢。
样式1
SELECT *
FROM quotation q
WHERE q.quotationId NOT IN (SELECT ip.quotation_id FROM invest_project ip)
样式2
SELECT *
FROM quotation q
LEFT JOIN invest_project ip
ON q.quotationId = ip.quotation_id
WHERE q.quotationId IS NULL
答案 0 :(得分:1)
尝试不带别名......
$(document).ready(function() {
var imgSrc = $("img").attr("src");
alert(imgSrc);
});
答案 1 :(得分:1)
当指定条件不显示空值数据时 试试这个
for card in computer_hand[:]:
答案 2 :(得分:1)
Select *
from [Table1] AS T1
where not exists( select * from [Table2] AS T2 where T1.ID = T2.ID)
这为我工作