String query = "create table emails " +
                       "(ID int, " +
                       "To varchar(20), " +
                       "From varchar(20), " +
                       "Message varchar(50))";




                   this java statment looks right. but getting a syntax error.

TO is a reserved word in SQL.

got it thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.