access里的视图在mysql里怎么写
我的access里有两个视图,放到mysql里就不能用了,在sqlserver里也不能运行,请大家帮忙
access里的视图语句:
(1)SELECT city.pid, city.cid, city.cname, city.goodsnum
FROM city
ORDER BY city.pid, city.cid;
(2)SELECT class2.subid, class2.fuid, class2.classname2
FROM class2
ORDER BY class2.fuid;
放到mysql运行如下:
(1)CREATE VIEW cxcity
AS SELECT city.pid, city.cid, city.cname, city.goodsnum
FROM city
ORDER BY city.pid, city.cid;
(2)CREATE VIEW cxclass
AS SELECT class2.subid, class2.fuid, class2.classname2
FROM class2
ORDER BY class2.fuid;
放到sqlserver里如下:
(1)CREATE VIEW cxcity
AS SELECT [city].[pid], [city].[cid], [city].[cname], [city].[goodsnum]
FROM city
ORDER BY [city].[pid], [city].[cid];
(2)CREATE VIEW cxclass
AS SELECT class2.subid, class2.fuid, class2.classname2
FROM class2
ORDER BY class2.fuid;
在sqlserver里提示:
服务器: 消息 170,级别 15,状态 1,行 2
第 2 行: ' ' 附近有语法错误。
不知道是哪里写错了,请指教!
还有:mysql里能不能创建视图,如果不行,那该怎么办,我是要传到服务器上的,服务器上的版本是4.0
请大家帮帮忙了!
------解决方案--------------------4.0 好象不支持视图.