Prentice Hall Oracle Plsql By Example 3Rd Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Prentice Hall Oracle Plsql By Example 3Rd Edition [Electronic resources] - نسخه متنی

Benjamin Rosenzweig

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید









A1:

Answer: Your answer should look similar to the following:



SET SERVEROUTPUT ON
DECLARE
-- A VARCHAR2 datatype that can contain the string
-- 'Introduction to Oracle PL/SQL'
v_descript VARCHAR2(35);
-- A NUMBER that allows for the conditions: can be
-- assigned 987654.55 but not 987654.567
-- or 9876543.55
v_number_test NUMBER(8,2);
-- [a variable] auto initialized to the value '603D'
v_location CONSTANT VARCHAR2(4) := '603D';
-- A BOOLEAN
v_boolean_test BOOLEAN;
-- A DATE datatype auto initialized to one week from
-- today
v_start_date DATE := TRUNC(SYSDATE) + 7;
BEGIN
DBMS_OUTPUT.PUT_LINE
('The location is: '||v_location||'.');
DBMS_OUTPUT.PUT_LINE
('The starting date is: '||v_start_date||'.');
END;
A2:

Answer: Your answer should look similar to the following:



SET SERVEROUT ON
DECLARE
-- A VARCHAR2 datatype that can contain the string
--'Introduction to Oracle PL/SQL'
v_descript VARCHAR2(35);
-- A NUMBER that allows for the conditions: can be
-- assigned 987654.55 but not 987654.567 or
-- 9876543.55
v_number_test NUMBER(8,2);
-- [a variable] auto initialized to the value '603D'
v_location CONSTANT VARCHAR2(4) := '603D';
-- A BOOLEAN
v_boolean_test BOOLEAN;
-- A DATE datatype auto initialized to one week from today
v_start_date DATE := TRUNC(SYSDATE) + 7;
BEGIN
IF v_descript =
'Introduction to Underwater Basketweaving'
THEN
DBMS_OUTPUT.PUT_LINE
('This course is '||v_descript||'.');
ELSIF v_location = '603D' THEN
-- No value has been assigned to v_descript
IF v_descript IS NOT NULL THEN
DBMS_OUTPUT.PUT_LINE ('The course is '||v_descript
||'.'||' The location is '||v_location||'.');
ELSE
DBMS_OUTPUT.PUT_LINE ('The course is unknown.'||
' The location is '||v_location||'.');
END IF;
ELSE
DBMS_OUTPUT.PUT_LINE ('The course and location '||
'could not be determined.');
END IF;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE ('An error occurred.');
END;

/ 289