SQL5、 将查询后的列重新命名
思路:使用AS
关键字重命名
代码解释:基本与上题相同,只不过要将device_id
列重命名为user_infos_example
SELECT
device_id AS user_infos_example
FROM
user_profile
WHERE
id = 1
OR id = 2;
思路:使用AS
关键字重命名
代码解释:基本与上题相同,只不过要将device_id
列重命名为user_infos_example
SELECT
device_id AS user_infos_example
FROM
user_profile
WHERE
id = 1
OR id = 2;