I've got a series of sql scripts that look like this:
CREATE TABLE table_one
(
column_one int not null,
column_two varchar(100) not null,
column_three_four_five int,
column_six decimal(16,4) null,
PRIMARY KEY ( column_one, column_three_four_five)
);
I'd like to clean up the layout to be easier to scan, something like this:
CREATE TABLE table_one
(
column_one int not null,
column_two varchar(100) not null,
column_three_four_five int,
column_six decimal(16,4) null,
PRIMARY KEY
(
column_one,
column_three_four_five
)
);
The exact layout is less important than being able to create a clean look to improve readability. (read: please don't flame the formatting itself) -grin-
What would be a good way to script this (I'm looking at you, Perl gods...)?