Savepoints work something like this ...
dml a
savepoint a;
dml b
rollback to savepoint a;
commit;
dml a will be commited, but not dml b.
Unsure when a good time to use it, but it does work a treat.
Showing posts with label hints. Show all posts
Showing posts with label hints. Show all posts
Wednesday, April 4, 2007
Tuesday, April 3, 2007
adding quotes in dynamic sql
Use the following to add a quote when writing dynamic sql. Useful when you can't remember ascii codes.
SELECT 'select ... '|| ' where username like ''A%'' ;'
The output looks something like the following ...
select ... where username like '%A' ;
SELECT 'select ... '|| ' where username like ''A%'' ;'
The output looks something like the following ...
select ... where username like '%A' ;
Subscribe to:
Posts (Atom)