Please ref Oracle Database Handbook it explains with examples..
Thanks,
Thanigaivasan.