#!/usr/bin/perl use SQL::Statement; my $sqla = "update abc set a = 's' where a = 't' and amnt > 100"; my $sqlb = "update abc t set t.a = 's' where t.a = 't' and t.amnt > 100"; my $parser = SQL::Parser->new(); $parser->{RaiseError}=1; $parser->{PrintError}=1; my $stmt = SQL::Statement->new($sqlb,$parser); my $columns = $stmt->column_defs() ; printf "Command %s\n",$stmt->command;