[prev] 58 [next]

Example Query

Example: simple scan of a table ...

select name from Employee

implemented as:

DB db = openDatabase("myDB");
Rel r = openRel(db,"Employee");
Scan s = start_scan(r);
Tuple t;
while ((t = next_tuple(s)) != NULL)
{
   char *name = getStrField(t,2);
   printf("%s\n", name);
}