SQL Code Style - align values to columns

Answered

I can't find an option - or a combination of options - to align the values to their columns in an INSERT INTO statement. Example:

INSERT INTO users (username, password, year, active)
VALUES ('admin', 'mypassword', 1980, true);

 

should be formatted to something like:

INSERT INTO users (username, password,    year, is_the_user_active, some_other_column)
VALUES ('admin', 'mypassword', 1980, true, 'some other value');

 

As you can see, the start of each value is aligned with the start if its column. Is this possible to achieve?

 

Thanks for any help.

2

Please sign in to leave a comment.