Question: how sqlj is different from jdbc?
Answer: While JDBC provides a complete dynamic SQL interface from Java to relational databases, SQLJ fills a complementary role for static SQL. ... SQLJ source programs are smaller than equivalent JDBC programs because SQLJ provides a shorter syntax. SQLJ uses database connections to type-check static SQL code.