The following code allows you to centralise data in a column using SQL, if you declared the column to be 20 characters wide.
SELECT lpad(‘ ‘,((20-length(dname))/2),’ ‘))||dname dept_name from dept
How to centre data in a column
The following code allows you to centralise data in a column using SQL, if you declared the column to be 20 characters wide.
SELECT lpad(‘ ‘,((20-length(dname))/2),’ ‘))||dname dept_name from dept