同样的脚本在不同的环境执行有的可以成功,有的却报错了
select rowid, a.*
from (select * from student st, score sc where st.sno = sc.sno) a
错误如下:
[img]http://dl2.iteye.com/upload/attachment/0113/5434/28e4cc9c-c8b9-3305-acd4-204765a64728.bmp[/img]
经核查是因为关联表中存在未设置主键的表引起的。加下主键即可。
select rowid, a.*
from (select * from student st, score sc where st.sno = sc.sno) a
错误如下:
[img]http://dl2.iteye.com/upload/attachment/0113/5434/28e4cc9c-c8b9-3305-acd4-204765a64728.bmp[/img]
经核查是因为关联表中存在未设置主键的表引起的。加下主键即可。