- 1 DECLARE
- v_incentive employees.salary%TYPE;
- BEGIN
- SELECT salary INTO v_incentive
- FROM employees
- WHERE EMPLOYEE_ID = 110;
- dbms_output.put_line( v_incentive );
- END;
- 2 DECLARE
- "hello" varchar2(10) := 'hello';
- BEGIN
- DBMS_Output.Put_Line("Hello")
- END;
- 3 DECLARE
- "BEGIN" varchar2(32) := 'BEGIN reserved word';
- BEGIN
- DBMS_Output.Put_Line("BEGIN");
- END;
- 4 DECLARE
- "BEGIN" varchar2(32) := 'reserved word should be in double quotes';
- BEGIN
- DBMS_Output.Put_Line(BEGIN);
- END;
- 5 DECLARE
- "BEGIN" varchar2(32) := 'begin';
- BEGIN
- DBMS_Output.Put_Line("Begin");
- END;
- 6 DECLARE
- "BEGIN" varchar2(32) := 'begin'; -- This is single line comment
- BEGIN
- /* This is
- multiline comment */
- DBMS_Output.Put_Line("Begin");
- END;
- 7 DECLARE
- v_id NUMBER(10);
- v_name VARCHAR2(32);
- BEGIN
- NULL;
- END;
- 9 DECLARE
- "HELLO" varchar2(10) := 'hello';
- BEGIN
- DBMS_Output.Put_Line(Hello);
- END;
- 11 CREATE OR REPLACE PROCEDURE pro_sample(
- name VARCHAR2,
- is_valid BOOLEAN
- ) IS
- BEGIN
- IF is_valid IS NULL THEN
- DBMS_OUTPUT.PUT_LINE(name || ' = NULL');
- ELSIF is_valid = TRUE THEN
- DBMS_OUTPUT.PUT_LINE( name || ' = TRUE');
- ELSE
- DBMS_OUTPUT.PUT_LINE( name || ' = FALSE');
- END IF;
- END;
[text] PSQL Assignment
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: