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
Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam

Declaring Records Whenever you define a RECORD type, you may declare records of that type, as the illustration shows: DECLARE TYPE StockItem IS RECORD ( item_no INTEG

LEVEL You use the LEVEL with the SELECT CONNECT BY statement to categorize rows from a database table into a tree structure. The LEVEL returns the level number of a node in a

Parameter and Keyword Description: cursor_variable_name: This identifies a cursor variable or the parameter formerly declared within the present scope. host_cursor_va

Using a Join on 2 tables, select all columns and all rows from the tables without the use of a Cartesian product. Query: SELECT * FROM EMPLOYEE1 JOIN CONTRACT ON EMPLOYEE

Magento change address format depending on store Project Description: What I need is that depending on the store in which the customer bought the address should change the fo

Define basic operators of relational algebra with an example each

Using Cursor Attributes: Every cursor has 4 attributes: %NOTFOUND, %FOUND, %ISOPEN, and %ROWCOUNT. If appended to the cursor name, they return the helpful information about

Declaring Objects: You can use the object types wherever built-in types like CHAR or NUMBER can be used. In the block below, you can declare object r of type Rational. Then, yo

Advantages of Packages The benefits of the Packages are as shown below: Modularity The Packages encapsulate logically associated items, types, and subprograms in the