这样查询,为什么查询的结果正确,但是没一项都是testbaseinfo中记录的倍数,如查询出A,则显示有n个A
SELECT dbo.teststate.name
FROM dbo.teststate INNER JOIN
dbo.testcontent ON dbo.teststate.stateid = dbo.testcontent.stateid CROSS JOIN
dbo.testbaseinfo
WHERE (dbo.testcontent.testid = '8#070423 ')
------解决方案--------------------testbaseinfo 的关联条件没写上
------解决方案--------------------你這裡的CROSS JOIN到testbaseinfo,沒看到有什麼作用,去掉吧。
SELECT dbo.teststate.name
FROM dbo.teststate INNER JOIN
dbo.testcontent ON dbo.teststate.stateid = dbo.testcontent.stateid
WHERE (dbo.testcontent.testid = '8#070423 ')