SQL: widely used non-procedural language

● Example: Find the name of the instructor with ID 22222

select name

from instructor

where instructor.ID = ‘22222’

● Example: Find the name of each instructor and the dept. name for all departments with budget larger than $95,000

select instructor.ID, department.dept name

from instructor, department

where instructor.dept name= department.dept name and department.budget > 95000

SQL contains both DDL and DML. These two are examples of DML.

■ Application programs generally access databases through one of the following methods :

● Language extensions to allow embedded SQL.

● Application program interface (API) (e.g., ODBC/JDBC) which allow SQL queries to be sent to a database.

results matching ""

    No results matching ""