Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Define a Variable to Match a Table Column Data Type
How To Define a Variable to Match a Table Column Data Type? - Oracle DBA FAQ - Working with Database Objects in PL/SQL
✍: FYIcenter.com
If you have a table, and want to define some variables to have exactly the same data types as some columns in that table, you can use table_name.column_name%TYPE as data types to define those variables. The tutorial sample below shows you how to do this:
CREATE OR REPLACE PROCEDURE FYI_CENTER AS my_email employees.email%TYPE; my_salary employees.salary%TYPE; BEGIN SELECT email, salary INTO my_email, my_salary FROM employees WHERE employee_id = 101; DBMS_OUTPUT.PUT_LINE('My email = ' || my_email); DBMS_OUTPUT.PUT_LINE('My salary = ' || my_salary); END; / My email = NKOCHHAR My salary = 17000
2007-04-26, 4712👍, 0💬
Popular Posts:
Can an anonymous class be declared as implementing an interface and extending a class? An anonymous ...
How do you locate the first X in a string txt? A) txt.find('X'); B) txt.locate('X'); C) txt.indexOf(...
How To Control Horizontal Alignment? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells By...
What is V model in testing? V model map’s the type of test to the stage of development in a project....
.NET INTERVIEW QUESTIONS - How to prevent my .NET DLL to be decompiled? By design .NET embeds rich M...