The following are Insert statement examples:
insert into emp (name, sal, bdate)
values ('Jones, Bill', 10000, 1944);
select job_no, title, lowsal, highsal
from newjob
where title <> 'Janitor';
insert into emp
values ('Jones, Bill', 10000, 1944);
/* Description of table employees from
database deptdb */
exec sql declare employees table
(eno smallint not null,
ename char(20) not null,
age smallint,
jobcode smallint,
sal float not null,
deptno smallint);
exec sql begin declare section;
emprec
int eno;
char ename[21];
int age;
int job;
float sal;
int deptno;
exec sql end declare section;
/* Assign values to fields in structure */
eno = 99;
ename = "Arnold K. Arol";
age = 42;
jobcode = 100;
sal = 100000;
deptno=47;
exec sql connect deptdb;
exec sql insert into employees values (:emprec);
exec sql disconnect;