On this page:
show-table
connect-adventure-works
7.8

6.5 plisqin-examples/adventure-works

 (require plisqin-examples/adventure-works)
  package: plisqin

procedure

(show-table x)  any/c

  x : (or/c query? string?)
Executes a query (or raw SQL) against the Adventure Works sample database.

> (aw:show-table "select ProductCategoryID, Name from ProductCategory")

Show TableShow SQL

select ProductCategoryID, Name from ProductCategory

ProductCategoryID

Name

1

Bikes

2

Components

3

Clothing

4

Accessories

Creates a connection to the Adventure Works sample database.
> (let* ([conn (aw:connect-adventure-works)]
         [stmt "select ProductCategoryID, Name from ProductCategory"]
         [rows (db:query-rows conn stmt)])
    (db:disconnect conn)
    rows)

'(#(1 "Bikes") #(2 "Components") #(3 "Clothing") #(4 "Accessories"))