设为首页 加入收藏

TOP

错误代码:1066Notuniquetable/alias:'c'
2015-11-21 02:09:12 来源: 作者: 【 】 浏览:2
Tags:错误 代码 1066Notuniquetable/alias:' c'

1、错误描述

?

1 queries executed, 0 success, 1 errors, 0 warnings

查询:SELECT (SELECT CONCAT( s.name, '/', sr.reame, '[', DATE_FORMAT(a.startTime, '%Y-%m-%d'), ']' ) FROM t_stu_info a, t_...

错误代码: 1066
Not unique table/alias: 'c'

执行耗时   : 0 sec
传送时间   : 0 sec
总耗时      : 0.001 sec

2、错误原因

?

在拼接SQL语句时,给t_stu_amount 和t_tea_info 取别名时,都取c

... from t_stu_info a,t_stu_amount c,t_tea_info c

导致数据库表别名重复

?

3、解决办法

将两个表的别名改为不一样的,如 ... from t_stu_info a,t_stu_amount c,t_tea_info o

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇mongodb增删改查 下一篇Mysql中那些锁机制之InnoDB

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: