MySQL 视图 第1349号错误解决方法_Mysql_脚本之家皇

复制代码 代码如下:CREATEORREPLACEVIEWBLOG_V_ADMIN (ID,NICKNAME,SEX,EMAIL,PHONE,QQ,MSN,HTTP,REGISTER_TIME, IP,LAST_LOGIN_IP,LOGIN_TIME) AS SELECT A.ID,A.NICKNAME,A.SEX,A.EMAIL,A.PHONE,A.QQ,A.MSN,A.HTTP,A.REGISTER_TIME, B.IPASLAST_LOGIN_IP,B.LOGIN_TIMEASLAST_LOGIN_TIME FROM BLOG_ADMINALEFTJOIN BLOG_ADMIN_LOGIN_TRACKBONB.ADMIN=A.IDLEFTJOIN (SELECTADMIN,MAXASLOGIN_TIMEFROMBLOG_ADMIN_LOGIN_TRACKGROUPBYADMIN)CONB.ADMIN=C.ADMIN;ERROR1349:View'sSELECTcontainsasubqueryintheFROMclause 这是BUG吗?见:http://bugs.mysql.com/bug.php?id=16757 木有办法,我只好这样改了: 复制代码 代码如下:CREATEORREPLACEVIEWBLOG_V_ADMIN (ID,NICKNAME,SEX,EMAIL,PHONE,QQ,MSN,HTTP,REGISTER_TIME, LOGIN_TIME,LAST_皇家赌场手机版,LOGIN_IP) AS SELECT A.ID,A.NICKNAME,A.SEX,A.EMAIL,A.PHONE,A.QQ,A.MSN,A.HTTP,A.REGISTER_TIME, (SELECTLOGIN_TIMEFROMBLOG_ADMIN_LOGIN_TRACKWHEREADMIN=A.IDORDERBYLOGIN_TIMEDESCLIMIT1)ASLAST_LOGIN_TIME, FROMBLOG_ADMIN_LOGIN_TRACKWHEREADMIN=A.IDORDERBYLOGIN_TIMEDESCLIMIT1)ASLAST_LOGIN_IP FROM BLOG_ADMINA;

本文由皇家赌场手机版发布于首页,转载请注明出处:MySQL 视图 第1349号错误解决方法_Mysql_脚本之家皇

相关阅读