dbkeys()

Description: returns information about the primary key columns

Syntax: dbkeys(f)

Parameters:

The return type is a list of records with the following fields:
Code Example
procedure main()
 f:=dbopen("mydb","O","user","fbalbi","mypasswd") # open user table

 # select host, user and password columns

 r:=dbselect(f, "host, user, password","")

 write(*f, " row(s) selected")

 write("\ntable keys")

 krec:=dbkeys(f) # retrieve primary key(s) information

 every i:=(1 to *krec) do {
   r:=krec[i]
   write("[", r["col"], "]") # print key name
 }

 close(f) # close table
end