It is possible to insert a new row by giving values only for a few columns instead of giving values for all the available columns.
The following INSERT command will insert a new row only two values.
insert into courses(ccode,name)
values ('odba','Oracle Database Administration');
The above command will create a new row in COURSES table with values for only two columns – CCODE and NAME. The remaining columns will take NULL value or the default value, if the column is associated with default value. We will discuss more about default value in the next chapter.
Null value means a value that is not available or not known. When a column’s value is not known then we store NULL value into the column. NULL value is neither 0 nor blank nor any other known value. We have already seen how to store null value into a column and when Oracle automatically stores null value into a column. We will discuss more about how to process null value later in this chapter.
There is given sql interview questions and answers that has been asked in many companies. For PL/SQL interview questions, visit our next...
1.Write a program to print the following format WELCOME TO PL/SQL PROGRAMMING BEGIN DBMS_OUTPUT.PUT_LINE('WELCOME TO PL/SQL PROGRAMMING...
Step1) Write the PL/SQL code in the note pad and save it as with extension name .sql ex: "test.sql" DECLARE x NUMBER; BEGI...
DECLARE emp_name_c CHAR(32); emp_name_v VARCHAR(32); BEGIN emp_name_c := 'sateesh.bagadhi'; emp_name_v := 'sateesh.ba...