Character types in pl/sql, PL-SQL Programming

Character Types

The Character types allow you to store alphanumeric data, represent words and text, and manipulate the character strings.

CHAR

You use the CHAR datatype to store the fixed-length character data. How the data is shown internally depends on the database character set. The CHAR datatype takes an optional parameter that specifies a maximum length of up to 32767 bytes. The syntax is shown below:

CHAR[(maximum_length)]

You cannot use a variable or constant to specify the maximum length; you should use an integer literal in the range 1 to 32767.

If you do not specify the maximum length, it defaults to 1. Keep in mind; you specify the maximum length in bytes, not characters. Therefore, if a CHAR (n) variable stores multi-byte characters, its maximum length is less than n characters.

CHAR Subtype

The CHAR subtype of CHARACTER has the same range of values as its base type. That is, the CHARACTER is just another name for CHAR. You can use this subtype for the compatibility with ANSI/ISO and IBM types or when you want an identifier more expressive than CHAR.

Posted Date: 10/2/2012 2:31:44 AM | Location : United States







Related Discussions:- Character types in pl/sql, Assignment Help, Ask Question on Character types in pl/sql, Get Answer, Expert's Help, Character types in pl/sql Discussions

Write discussion on Character types in pl/sql
Your posts are moderated
Related Questions
Deriving Predicates from Predicates in SQL The corresponding section in the theory book describes how predicates can be derived from predicates using (a) the logical connectiv

Using Host Arrays The Client-side programs can use anonymous PL/SQL blocks to bulk-bind input and output host arrays. However, this is the well-organized way to pass the colle

Row Counterparts of Table Operators SQL does not have counterparts tuple rename, tuple projection, tuple extension, tuple join and tuple compose. To obtain the same effects as

Creating a Table Syantax: CREATE TABLE ENROLMENT (StudentId SID, Name   VARCHAR (30) NOT NULL, CourseId CID, PRIMARY KEY (StudentId, CourseId)) ; Explan

heap sort program in pl/sql

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean’s wants to create a trigger that automatically updates the stock level of all pr

a. Create a table odetails_new. It has all the attributes of odetails and an additional column called cost, whose values are the product of the quantity and price of the part bein

Parameter and Keyword Description: dynamic_string: This is a string variable, literal, or expression which represents a SQL statement or the PL/SQL block. define_vari

heap sort program in pl/sql

Ending Transactions A good quality programming practice is to commit or roll back every transaction explicitly. Whether you rollback or issue the commit in your PL/SQL program