Deleting a row in Oracle with ESQL/C
I'm trying to write a program with C and ESQL. One of the things I want to do is delete old row from one of my table (by comparing with SYSDATE) each time the program is run.
So my SQL code looks like this:
DELETE FROM Trip
WHERE dateT < (SYSDATE - 1);
Now I know this works because I tested it with SQL+ Worksheet
But when I want to do it with ESQL like this:
void deleteOutDated(){
EXEC SQL DELETE FROM Trip WHERE dateT < (SYSDATE - 1);
printf("Old trips deletes");
}
My program just freezes there.
So I wanted to know if it is possible to make 开发者_StackOverflowsuch a statement in ESQL and if it is what am I doing wrong?
精彩评论