DATATYPES

1-WHAT IS THE MAX LENGHT OF VARCHAR2 DATATYPE IN PL/SQL?
2-WHAT IS THE USE OF UROWID?
3-WHAT ARE THE SUBTYPES?GIVE ANY 2 EXAMPLE?
4- WHAT IS THE GENERAL STANDARD FOR DECLARATION?

Questions by sdas84jobs

Showing Answers 1 - 9 of 9 Answers

nitks

  • Oct 6th, 2010
 

1. Max length of Varchar2 in PL/SQL is 2 to the power of 15, ie 32767 bytes
2. Oracle uses a ROWID datatype to store the address (rowid) of every row in the database. Physical rowids store the addresses of rows in ordinary tables (excluding index-organized tables), clustered tables, table partitions and sub partitions, indexes, and index partitions and sub partitions. Logical rowids store the addresses of rows in index-organized tables. A single datatype called the universal rowid, or UROWID, supports both logical and physical rowids, as well as rowids of foreign tables such as non-Oracle tables accessed through a gateway.A column of the UROWID datatype can store all kinds of rowids. The value of the COMPATIBLE initialization parameter must be set to 8.1 or higher to use UROWID columns.
3. Subtypes are a subset of the usual datatypes, with some constraints added to it. Eg: SUBTYPE Accumulator IS NUMBER (4,2);

  Was this answer useful?  Yes

1. Maximum length of a varible in PL/SQL is 32767 bytes
2. The UROWID or Universal Rowid is useful for storing logical addresses of all the rows of Index-organized tables. It can store both the logical and physical address of rows.
3. Subtypes specify the same set of operations as their base type, it doesn't introduce a new type. PL/SQL predefines several subtypes in package STANDARD. Example of subtypes CHARACTER and INTEGER as follows:

SUBTYPE CHARACTER IS CHAR;
SUBTYPE INTEGER IS NUMBER(38,0);

4. Declare
      A number(10);
      B number(3);
      C number(10);
    Begin
      C:=A+B;
    End;
     

  Was this answer useful?  Yes

1... max length is 32767
2 rowid means row plus id actuall its psedocolmn that store the value of each row
with the help of rowid
>>>  we can remove duplicate value
>>> we can dispalay particular value
>>. we can display mth colomn to nth colomn value
3
  subtypes meabs partition of types ,il pl/sql 11g introduce various subdatayes
like
simple_float
simple_integer
simple_double
these are the subtypes of binary_float, PLS_integer.binary_double
4
decration is very simple in plsql
syntax- varaible name  datatype;
eg
v_num  number;
v_ name varchar(35);

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions