Character types in pl/sql, PL-SQL Programming

Assignment Help:

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.


Related Discussions:- Character types in pl/sql

Like operator-comparison operators, LIKE Operator You use the LIKE opera...

LIKE Operator You use the LIKE operator to compare the character value to a pattern. The Case is significant. LIKE returns the Boolean value TRUE when the character patterns mat

Lob types in pl/sql, LOB Types The large object (LOB) datatypes like BF...

LOB Types The large object (LOB) datatypes like BFILE, BLOB, CLOB, and NCLOB store the blocks of unstructured data (like graphic images, text, video clips, and sound waveforms)

Execute immediate statement - syntax, EXECUTE IMMEDIATE Statement   Th...

EXECUTE IMMEDIATE Statement   The EXECUTE IMMEDIATE statement prepare (parses) and instantly executes a dynamic SQL statement or an anonymous PL/SQL block. Syntax:

Effects of null in table literal, Effects of NULL in Table Literal Whe...

Effects of NULL in Table Literal When a VALUES expression appears as the source value for an SQL INSERT statement, the key word NULL can appear as a field value, such that for

Defining records, Defining and Declaring Records To create records, yo...

Defining and Declaring Records To create records, you have to define a RECORD type, and then declare records of that type. You may also define RECORD types in the declarative

Keyword & parameter description - exceptions, Keyword & Parameter Descripti...

Keyword & Parameter Description: WHEN: This keyword introduces the exception handler. You can have many exceptions execute the similar sequence of the statements by follo

Pass the nulls to a dynamic sql, Pass the nulls to a dynamic SQL: Pas...

Pass the nulls to a dynamic SQL: Passing Nulls: Assume that you want to pass the nulls to a dynamic SQL statement. For illustration, you may write the EXECUTE IMMEDIATE

Cursors - syntax, Cursors   To execute the multi-row query, the Oracle...

Cursors   To execute the multi-row query, the Oracle opens an unnamed work region which stores the processing information. The cursor names the work region, access the informa

Pl sql code to declare cursors with parameter, Write a pl/sql block that de...

Write a pl/sql block that declares and uses cursors with parameters. In a loop, use a cursor to retrieve the department number and the department name from the departments table

Use the returning clause -improve performance of application, Use the RETUR...

Use the RETURNING Clause Frequently, the application requires information about the row affected by a SQL operation, for illustration, to produce a report or take a subsequent

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd