Assignment statement in pl sql, PL-SQL Programming

Assignment Help:

Assignment Statement:

The assignment statement sets the present value of the variable, parameter, field, or element. The statement consists of an assignment target followed by an assignment operator and an expression. Whenever the statement is executed, the expressions evaluate and the resulting value is stored in the target.

 

1257_assignment statement.png

 Keyword and Parameter Description

1) collection_name:

These identify an index-by table, nested table, or varray previously declared within the present scope.

2) cursor_variable_name:

These identify a PL/SQL cursor variable formerly declared within the present scope. Only the value of the other cursor variable can be assigned to a cursor variable.

3) host_cursor_variable_name:

These identify a cursor variable declared in the PL/SQL host atmosphere and passed to the PL/SQL as a bind variable. The host cursor's datatype variable is well-suited with the return type of any PL/SQL cursor variable. The host variables have to be prefixed with a colon.

4) host_variable_name:

These identify a variable declared in the PL/SQL host atmosphere and passed to the PL/SQL as a bind variable. The host variables should be prefixed with a colon.

5) object_name:

These identify an object (instance of the object type) formerly declared within the present scope.

6) indicator_name:

These identify an indicator variable declared in a PL/SQL host atmosphere and passed to the PL/SQL. The Indicator variables should be prefixed with a colon. The indicator variable "indicates" the value or condition of its related host variable. For illustration, in the Oracle Precompiler atmosphere, the indicator variables let you detect nulls or truncated values in the output host variables.

7) parameter_name:

These identify the formal OUT or IN OUT parameter of the subprogram in which the assignment statement become visible.

 8) index:

This is a numeric expression that should results a value of the type BINARY_INTEGER or a value implicitly convertible to that datatype.

9) record_name.field_nameP:

These identify the field in a user-defined or %ROWTYPE record earlier declared within the present scope.

10) variable_name:

These identify a PL/SQL variable earlier declared within the present scope.


Related Discussions:- Assignment statement in pl sql

Advantages of subprograms, Advantages of Subprograms The Subprograms g...

Advantages of Subprograms The Subprograms give extensibility; that is, tailor the PL/SQL language to suit your requirements. For illustration, if you require a procedure which

Using limit - collection method, Using LIMIT For nested tables, that h...

Using LIMIT For nested tables, that have no maximum size, the LIMIT returns NULL. For varrays, the LIMIT returns the maximum number of elements that a varray can have (that yo

%notfound - explicit cursor attributes, %NOTFOUND The %NOTFOUND is log...

%NOTFOUND The %NOTFOUND is logical, opposite of the %FOUND. The %NOTFOUND yields FALSE if the last fetch returned a row, or TRUE when the final fetch failed to return a row. I

Assignment of variable - updating a variable, Assignment of Variable - Upda...

Assignment of Variable - Updating a Variable Syntax: SET SN = SID ('S2'); This can obviously be read as "set the variable SN to be equal in value to SID ( 'S2' )".

Updating a variable, Updating a Variable Assignment of an attribute va...

Updating a Variable Assignment of an attribute value in a variable of a structured type Synatx: SET SN.C = 'S2'; As in Example the entire statement is equivalent to a

Object types - syntax, Object Types An object type is a user-defined co...

Object Types An object type is a user-defined complex datatype which encapsulates the data structure along with the functions and procedures required to manipulate the data. Th

Max and min operator in sql, MAX and MIN operator in SQL Example: ...

MAX and MIN operator in SQL Example: (SELECT MAX (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') (SELECT MIN (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') Example

Error handling in pl/sql, Error Handling The PL/SQL makes it easy to de...

Error Handling The PL/SQL makes it easy to detect and process the predefined and user-defined error conditions known as exceptions. Whenever an error occurs, an exception is ra

How transactions guard your database, How Transactions Guard Your Database ...

How Transactions Guard Your Database The transaction is a sequence of SQL data manipulation statements which does a logical unit of work. The Oracle treats the sequence of SQL

Use of count in sql, Use of COUNT in SQL It describes and discusses va...

Use of COUNT in SQL It describes and discusses various general methods of expressing constraints, eventually noting that support for "=" with relation operands is sufficient f

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