查询c.last_ name, c.department id, dlocation_id Lciy,其中,c为cmploycs表 region_name 的别名,d为departments 表的别名,1为locations 表的别名。
时间: 2024-05-05 15:22:24 浏览: 3
您的 SQL 查询语句应该是这样的:
```
SELECT c.last_name, c.department_id, 1.location_id AS Lcity
FROM employees c, departments d, locations 1
WHERE c.department_id = d.department_id AND d.location_id = 1.location_id;
```
这个查询中,我们使用了表的别名来简化查询语句,同时使用了 WHERE 子句来连接多个表。请注意,我们在引用 locations 表中的 location_id 列时,需要使用别名 1 来指代该表。