thanks but i know how to get the column name and column type using databasemetadata. but i am developing editor in java to run all sql queries like select,delete,insert and all. its all working fine for me,but if i give the command like dec tablename , show user,rollback/ it wont work. i think u understand what i am asking. thanks ..