1 ----------------------------------README---------------------------------------
2 This contains an example program that demonstates usage of csql tool.
7 It creates table t1 with two fields f1 integer (primary key) and f2 string.
10 Inserts 5 rows into the table t1
13 select value of f2 from table t1 for tuple with f1 value 3
14 select all the tuples from table t1
17 delete all rows from table t1 with f1 value 3
18 delete all rows from table t1;
25 1. Set the necessary enviroment variables using the setup script
26 under the csql root directory
29 2. Run the csql tool with appropriate sql script as input
30 $csql -u root -p manager -s create.sql
35 echo create table t1 (f1 integer, f2 char (20), primary key(f1));
39 Statement Executed: Rows Affected = 1
40 Statement Executed: Rows Affected = 1
41 Statement Executed: Rows Affected = 1
42 Statement Executed: Rows Affected = 1
43 Statement Executed: Rows Affected = 1
46 echo select f2 from t1 where f1 =3;
47 ---------------------------------------------------------
49 ---------------------------------------------------------
52 echo select * from t1;
53 ---------------------------------------------------------
55 ---------------------------------------------------------
63 echo delete from t1 where f1 =3;
64 Statement Executed: Rows Affected = 1
66 Statement Executed: Rows Affected = 4