foreach my $index_col (keys %{$schema->{"zsql:table"}->{$db_table}->{'zsql:index'}->{$db_index}->{'zsql:field'}} ) { #### my @columns = keys(%{$schema->{"zsql:table"}->{$db_table}->{'zsql:index'}->{$db_index}->{'zsql:field'}}); foreach my $index_col (@columns ) { #### Creating table TEST with statement create table TEST (TEST_ID INT NOT NULL, Name VARCHAR (255) NULL, ItemID VARCHAR (60) NULL, REF_ID VARCHAR (32) NULL, Entry_Point CHAR (1) NULL, Entry_Point_QA CHAR (1) NULL, Action CHAR (1) NULL, Agent CHAR (1) NULL, PRIMARY KEY (T EST_ID )) Adding index TEST_2ND_KEY to table TEST with CREATE INDEX TEST_2ND_KEY on TEST (Entry_Point, ItemID, TEST_ID, REF_ID) Adding index TEST_3RD_KEY to table TEST with CREATE INDEX TEST_3RD_KEY on TEST (Entry_Point, ItemID, TEST_ID, REF_ID) Adding index TEST_4TH_KEY to table TEST with CREATE INDEX TEST_4TH_KEY on TEST (Entry_Point, ItemID, TEST_ID, REF_ID)