Britto
Britto

Reputation: 515

SQlite 3.8.8 SPACE() function alternative

Is there a way to generate blank spaces in SQLite in the same way as we do in MS SQL using SPACE function?

Example:

SELECT SPACE(field * 4) FROM test

Best regards

Upvotes: 1

Views: 595

Answers (1)

CL.
CL.

Reputation: 180030

You can use the printf function to pad an empty string to the desired width:

SELECT printf('%*s', 4, '');

Upvotes: 1

Related Questions