Home » Developer & Programmer » Precompilers, OCI & OCCI » Delete everything from a table
Delete everything from a table [message #93557] Sat, 15 June 2002 06:21 Go to next message
Tibor Bata
Messages: 2
Registered: May 2002
Junior Member
Hi,
I want to delete everything from a table in Pro*C.

/*login*/
EXEC SQL CONNECT :username IDENTIFIED BY :password;
...
/*logout*/
EXEC SQL COMMIT WORK RELEASE;

/*DELETE everything from table*/
EXEC SQL SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
EXEC SQL DELETE FROM table_name;
EXEC SQL COMMIT;

These are the code samples with error handling in another function.

Does anybody know what is the problem?

br
bata
Re: Delete everything from a table [message #93573 is a reply to message #93557] Thu, 27 June 2002 12:47 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Why do you use "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;"? You shouldn't need that under normal circumstances.

That statement should simply mean that after you've deleted and someone adds data to the table and commit's it - you won't see it if you query the table again. It that what you want?
Previous Topic: String literal converted to char* in formal argument 2 in call to sqlbuft(void**, char*)
Next Topic: OCI linker error
Goto Forum:
  


Current Time: Fri Apr 19 20:39:28 CDT 2024