SQL (Structured Query Language) is a special computer language intended for users to interact with databases either in getting or manipulating data (SQL-Data Manipulation Language or SQL-DML) or developing structures (SQL-Data Definition Language or SQL-DDL) where data will eventually be stored.

How is SQL used?
SQL can be used either in an interactive tool or embedded (or constructed dynamically) in a programming language. When used interactively by most IT professionals, they are normally in order to test statements, dynamically and instantly making changes in the database.

SQL used dynamically using a database tool like MySQL Query Browser

SQL used inside a Java Program