Showing posts with label hints. Show all posts
Showing posts with label hints. Show all posts

Wednesday, April 4, 2007

savepoints

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.

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' ;

Monday, April 2, 2007

hiding CODE

Use the following to hide pl/sql code in the database.

wrap iname="sql in file" oname="sql out file"
compile in the database.

Works an absolute trick !!!