gpt4 book ai didi

mysql - 字段列表中的未知列错误

转载 作者:行者123 更新时间:2023-11-29 11:42:40 25 4
gpt4 key购买 nike

我正在对一堆表进行内部联接,并且我确实使所有这些表都存在。但是当我每次输入查询时,它总是显示'

Unknown column 'tbl_undertime.ut_date' in 'field list'

我非常确定tbl_undertime是我数据库下的一个表,但我不知道为什么它不断返回这样的错误。我已经删除了该表并再次使用相同的名称和列创建了一个新表,但仍然给出了相同的错误。

非常感谢您的帮助。

select tbl_employee.lname, tbl_employee.fname, tbl_employee.mi,     
tbl_employee.sss_no,
tbl_employee.philhealth_no, tbl_employee.dept_id, tbl_employee.salaryperday,
tbl_earlyout.timeout_date, tbl_late.late_date, tbl_overtime.ot_date,
tbl_absent.absentdate,
tbl_leave.leave_type, tbl_leave.start_date, tbl_leave.end_date,
tbl_undertime.utdate, tbl_cashadv.cashadv_date,
tbl_pay15.gross_sal
from tbl_employee
inner join tbl_earlyout
on tbl_employee.empid = tbl_earlyout.empid
inner join tbl_late
on tbl_late.empid = tbl_overtime.empid
inner join tbl_overtime
on tbl_overtime.empid = tbl_absent.empid
inner join tbl_absent
on tbl_absent.empid = tbl_leave.empid
inner join tbl_leave
on tbl_leave.empid = tbl_undertime.empid
inner join tbl_cashadv
on tbl_cashadv.empid = tbl_pay15.empid;

+---------------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+---------+------+-----+---------+-------+
| ut_id | int(11) | NO | PRI | NULL | |
| empid | int(11) | YES | MUL | NULL | |
| utdate | date | YES | | NULL | |
| ut_mins_hours | double | YES | | NULL | |
+---------------+---------+------+-----+---------+-------+

最佳答案

查看您的代码,您的表格列似乎是 utdate 而不是 ut_date。我想您的问题是拼写错误,因此未知列'tbl_undertime.ut_date

关于mysql - 字段列表中的未知列错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35510185/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com