Answer the question
In order to leave comments, you need to log in
What is the best way to generate SQL?
I am looking for the most suitable tool for Java to generate SQL code (create table, selects, etc).
At the expense of Freemarker, Velocity, StringTemplates is more or less clear.
What else is more suitable for code generation?
Answer the question
In order to leave comments, you need to log in
For SQL, I think the best client for Windows is HeidiSQL www.heidisql.com
This is an OpenSource project that is constantly developed by a huge community, updates are released 3-4 times a month.
If you want something like this:
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Book> q = cb.createQuery(Book.class);
Root<Book> b = q.from(Book.class);
q.select(b).orderBy(cb.desc(b.get("id")));
TypedQuery<Book> findAllBooks = em.createQuery(q);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question