Almost any language is fine. Choose your own language depending on what you want to do.
If you're just building programs to find out how DB works, consider languages โโthat don't need a lot of glue code. Candidates: C #, python, perl, ruby, php, Java. C ++ has too much gluing code to be a good choice for use as a DB learning language.
Sticking to Java, as you already know, is a great choice.
If you just want to get some experience with SQL in general, I would highly recommend the following tutorials:
http://sqlcourse.com/
and
http://sqlcourse2.com/
They are built into query interpreters.
source
share