sql()

Description: submits an SQL query using the connection opened by f

Syntax: sql(f, query)

Parameters:


Code Example
procedure main()
 db:=open("personnel_db","O","manager","managerpasswd") # open table

 # prepare SQL query string to create an employees table of 5 columns

 query:="CREATE TABLE employees (id INTEGER PRIMARY KEY, name VARCHAR(40),
         phone VARCHAR(12), DOB DATE, pay FLOAT)"

 # sql needs an opened connection in order to work; that's why we have
 # to open an existing table associated to db
 # this requirement will be avoided in the next ODBC interface version

 sql(db, query) # execute query

 close(db) # close 
end