是否可以在没有别名的情况下编写此 sql 查询?我正在使用一个不包含别名的 PHP 脚本,所以我对此有疑问。
如果这是可能的,请为我提供一些帮助
这是代码:
SELECT
time1.Time, time2.Time, time1.Signal, v.name, v.lastname, k.vehicle, time1.Reg
FROM
data time1
INNER JOIN data time2
ON time1.id != time2.id
AND time1.serial= time2.serial
INNER JOIN drivers v
ON time1.FK_ID_driver=v.ID_driver
INNER JOIN vehicles k
ON time1.Reg=k.Reg
WHERE
TIMEDIFF(time2.Time, time1.Time) BETWEEN '00:15:00' AND '00:30:00';