Alex Rivera | Logout

Hidden features of PL/SQL

Asked 2009-06-23T09:20:03.967
27

In light of the "Hidden features of..." series of questions, what little-known features of PL/SQL have become useful to you?

Edit: Features specific to PL/SQL are preferred over features of Oracle's SQL syntax. However, because PL/SQL can use most of Oracle's SQL constructs, they may be included if they make programming in PL/SQL easier.

Edit
Report

1 Answer

12

Do you know that with the option SAMPLE (K) you can SELECT only a sample composed by up to K percent of an Oracle table?

SELECT *
  FROM MASSIVE_TABLE SAMPLE (5);

The previous statement retrieves a randomic set composed by up to 5% of the records stored in the massive table called MASSIVE_TABLE.

answered 2010-05-18T13:54:44.490

Your Answer