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 Data Field as NOT NULL
How To Define a Data Field as NOT NULL? - Oracle DBA FAQ - Working with Database Objects in PL/SQL
✍: FYIcenter.com
When defining a specific RECORD type, you can define a data field as NOT NULL to make sure variables with this RECORD type to always have values in this field. A field defined as NOT NULL must have a default value. Here is a tutorial script showing you how to define a data field as NOT NULL:
CREATE OR REPLACE PROCEDURE HELLO AS
TYPE student IS RECORD (
id NUMBER(5) NOT NULL DEFAULT 0,
first_name VARCHAR(80),
last_name VARCHAR(80)
);
best_student student;
another_student student;
class_name VARCHAR2(80);
BEGIN
class_name := 'FYI Center 2006';
best_student.first_name := 'The';
best_student.last_name := 'Best';
DBMS_OUTPUT.PUT_LINE('Best student ID = '
|| best_student.id);
DBMS_OUTPUT.PUT_LINE('Best student = ' ||
best_student.first_name || ' '
|| best_student.last_name);
END;
/
Best student ID = 0
Best student = The Best
2007-04-27, 5134👍, 0💬
Popular Posts:
How do we get the current culture of the environment in windows and ASP.NET? “CultureInfo.CurrentCul. ..
How do we enable SQL Cache Dependency in ASP.NET 2.0? Below are the broader steps to enable a SQL Ca...
How to make elements invisible? Change the "visibility" attribute of the style object associated wit...
If we have the following in a Java code: String s="abc"; String s2="abc"; Then what will be output o...
What is shadowing ? When two elements in a program have same name, one of them can hide and shadow t...