Your question is unclear, if not nonsensical. The use of the term, 'compiler', can be stretched to fit, possibly, but if you have to ask the question, you're missing some important background. Neither Java nor SQL 'compile' to native machine code. Each can be 'pretreated' to reduce overhead under certain circumstances. Some people may refer to this as compilation or pre-compilation. Java is a programming language. SQL is a database query language. One is an apple and the other is an orange, if you get my drift.
ive installed linux newly, by default C & C++ compiler was there,i was able to write programs in C & C++ and compile it using cc,GCC,G++ .But java programs are not compiling.Is Java wont be installed by default.If so how to install it.Ive used ''which Java'' as a command to find out java.Regarding SQL just starting to learn.So dis regard it.?Plz