<p>In T-SQL, SPACE() function is used to add spaces to a string. For e.g. </p>

<pre><code>@s = 'He' + space(5) + 'llo'
</code></pre>

<p>Output</p>

<pre><code>He     llo
</code></pre>

<p>So is there any function in PL/SQL that is equivalent to SPACE()?</p>

<p>Thank you.</p>

You can use RPAD or LPAD functions
```
```
select 'He'  || rpad(' ',5,' ') || 'llo'
from dual;
/
```
```
or in PL/SQL it would be:
```
```
declare
  x varchar2(20);
begin
  x:= 'He'  || rpad(' ',5,' ') || 'llo';
end;
/
```
```