问题描述:

In Oracle DB there is one table called Employees having data like below.

emp_first_name emp_surname city

------------------------------------------

Anil Shaw Gurgaon

Mukesh Jadav Pune

Write a SQL query to produce output like below. The first name should have 8 characters.

Anil Shaw

Gurgaon

Mukesh Jadav

Pune

网友答案:
SELECT RPAD( emp_first-name, 8, ' ' ) || ' ' || emp_surname || CHR(10) || city
FROM   Employees;
相关阅读:
Top