select device_id
from user_profile
limit 2;

select device_id /选择 device_id 字段。

from user_profile /指定从 user_profile 表中获取数据。

limit 2; /限制查询结果只返回前 2 条记录