Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
select name,(name,1,3||phone_no,1,3)from users order by (name);
我正在为上述问题编写一个查询,它显示错误。写一个来显示用户名和密码。密码应通过连接用户名的前三个字符和电话号码中的前三个数字来生成,并提供别名作为密码。根据用户名对结果进行排序
删除多余的括号并使用子字符串函数
select name,substr(name,1,3)|| substr(phone_no,1,3) from users order by name