---
title: "PLSQL Procedures – Top Syntax Rules"
description: "PL/ SQL  is a case-independent language, unless you specifically set up Oracle to be case-sensitive or explicitly define object names within the \"\"  marks. All keywords and Oracle supplied objects are..."
url: https://srinimf.com/2015/04/30/pl-sql-syntax-rules/
date: 2015-04-30
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2015/04/pexels-photo-7516364.jpeg?fit=1880%2C1253&ssl=1
categories: ["Oracle", "PL/SQL"]
tags: ["PL/SQL Syntax", "SQL tips and tricks"]
type: post
lang: en
---

# PLSQL Procedures – Top Syntax Rules

PL/SQL is a case-independent language, unless you specifically set up Oracle to be case-sensitive or explicitly define object names within the “” marks.

- All keywords and Oracle supplied objects are UPPERCASE.
- User-defined variables and objects are lowercase.
- All words are separated with an underscore (_) symbol

Related[What is Package in Oracle PLSQL](https://srinimf.com/2012/07/21/sql-what-is-package/)

## Audio Post

## You can also align all long-running code blocks vertically, as follows:

```
SQL> SELECT contact_id
  2       ,  member_id
  3       ,  first_name
  4       ,  last_name
  5       ,  last_updated_by
  6       ,  last_update_date
  7    FROM  video_store.contact
  8   WHERE  member_id = 1001
  9     AND  contact_type = 1003
 10  /
```

## Data types

| **Data Type** | **Prefix** | **Example** | **Comment** |
| --- | --- | --- | --- |
| Boolean | B | lb_employee_status | Prefix common variables |
| Date | D | ld_hire_date |   |
| Number | N | gv_bonus_percentage |   |
| Varchar2 | V | gv_department |   |
| Cursor | cur, c | c_item | Prefix cursors and records like this |
| Record | rec, r | r_employee |   |
| Type | typ, t | typ_monthly_sale |   |
| Associative array | aa | aa_sales_rank | Lexicon varies |
| Varray | va | va_top_sales_item | Lexicon varies |
| Nested table | Nt | nt_customer_address | Lexicon varies |
| Exception | ex, e | ex_bonus_too_high |   |
| Table type | Tt | tt_customer | Lexicon varies |

## Variables

| **Scope** | **Prefix** | **Example** | **Comment** |
| --- | --- | --- | --- |
| Global Private Variable | G | gd_hire_date | d – date |
| Local Variable | L | lv_first_name | v – varchar |
| Parameter | i, o, io | pi_employee_id | i – in, o – out, io – in out |

Related

- [PL/SQL Engine – How it Process SQL Statements](https://srinimf.com/2014/08/09/oracle-plsql-architecture/)DateAugust 9, 2014
- [3 Top PL/SQL Errors and How to Fix Them](https://srinimf.com/2013/12/31/plsql-errors-oracle/)DateDecember 31, 2013
- [PLSQL: Early Vs Late Binding Concepts Simplified](https://srinimf.com/2015/04/20/plsql-architecture/)DateApril 20, 2015

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2015%2F04%2F30%2Fpl-sql-syntax-rules%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2015%2F04%2Fpexels-photo-7516364.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=%3Cstrong%3EPLSQL%20Procedures%20-%20Top%20Syntax%20Rules%3C%2Fstrong%3E)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2015/04/30/pl-sql-syntax-rules/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2015/04/30/pl-sql-syntax-rules/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2015/04/30/pl-sql-syntax-rules/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2015/04/30/pl-sql-syntax-rules/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20%3Cstrong%3EPLSQL%20Procedures%20-%20Top%20Syntax%20Rules%3C%2Fstrong%3E&body=https%3A%2F%2Fsrinimf.com%2F2015%2F04%2F30%2Fpl-sql-syntax-rules%2F&share=email)
-

### Like this:

Like Loading…
