就是最一般的查询操作呀。如果是Access或SQL server等建议使用ADO组件, with Query1 do begin
Close();SQL.Clear;
SQL.Add('SELECT x,x1,x2 FROM xxx WHERE (x1=x1 and x2=x2)')'
try
Open();
except
exit;
end;
if not IsEmpty() then begin
edit1.Text := FieldByName('x').AsString;
//...........
end;
end;你的意思是要找个人帮你做吗?呵呵
Close();SQL.Clear;
SQL.Add('SELECT x,x1,x2 FROM xxx WHERE (x1=x1 and x2=x2)')'
try
Open();
except
exit;
end;
if not IsEmpty() then begin
edit1.Text := FieldByName('x').AsString;
//...........
end;
end;你的意思是要找个人帮你做吗?呵呵
select s.sname,c.cname,sc.grade
from student s,course c,s_c sc
where s.sno=sc.sno and sc.cno=c.cno and c.cno in ('001','002') and
s.sno in (
select s1.sno
from s_c s1,s_c s2
where s1.sno=s2.sno and
s1.cno='001' and
s2.cno='002' )