PL/SQL Basics
https://www.udemy.com/course/plsql-by-example/learn/lecture/3169046#overview
PL/SQL Structure
PL/SQL Structure DECLARE
BEGIN
EXCEPTION
END;
BEGIN
dbms_output.put_line("시작합니다")
-- console.log개념
END;
変数の宣言 DECLARTE
변수명 (constant) 변수타입:=디폴트값;
변수명 (constant) 변수타입 default 디폴트값;
コメント -- 한 줄짜리 주석
/*
여러 줄짜리 주석
*/
変数スコープ DECLARE
변수명 변수타입 := 디폴트값;
-- 전역변수
BEGIN
DECLARE
변수명 변수타입 := 디폴트값;
-- 지역변수
BEGIN
END;
END
IF then ELSE DECLARE
변수 타입 := 디폴트값;
BEGIN
if 조건 비교
then -- 참
로직 수행;
else -- 거짓
로직 수행;
end if;
END;
例DECLARE
amount := 101;
discount := 0;
BEGIN
if amount > 200
then
discount := amount * .2;
elsif amount >= 100 and amount <= 200
then
discount := amount * .1;
else
discount := amount * .05;
end if;
END;
CASE DECLARE
amount := 101;
discount := 0;
BEGIN
CASE
WHEN amount > 200
then
discount := amount * .2;
WHEN amount >= 100 and amount <= 200
then
discount := amount * .1;
else
discount := amount * .05;
end CASE;
END;
WHILE DECLARE
counter number(2) := 10;
BEGIN
WHILE counter < 20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
FOR DECLARE
counter number(2) := 10;
BEGIN
FOR counter IN (REVERSE) 10..20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
Reference
この問題について(PL/SQL Basics), 我々は、より多くの情報をここで見つけました
https://velog.io/@woobuntu/PLSQL-Basics
テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol
DECLARE
BEGIN
EXCEPTION
END;
BEGIN
dbms_output.put_line("시작합니다")
-- console.log개념
END;
DECLARTE
변수명 (constant) 변수타입:=디폴트값;
변수명 (constant) 변수타입 default 디폴트값;
コメント -- 한 줄짜리 주석
/*
여러 줄짜리 주석
*/
変数スコープ DECLARE
변수명 변수타입 := 디폴트값;
-- 전역변수
BEGIN
DECLARE
변수명 변수타입 := 디폴트값;
-- 지역변수
BEGIN
END;
END
IF then ELSE DECLARE
변수 타입 := 디폴트값;
BEGIN
if 조건 비교
then -- 참
로직 수행;
else -- 거짓
로직 수행;
end if;
END;
例DECLARE
amount := 101;
discount := 0;
BEGIN
if amount > 200
then
discount := amount * .2;
elsif amount >= 100 and amount <= 200
then
discount := amount * .1;
else
discount := amount * .05;
end if;
END;
CASE DECLARE
amount := 101;
discount := 0;
BEGIN
CASE
WHEN amount > 200
then
discount := amount * .2;
WHEN amount >= 100 and amount <= 200
then
discount := amount * .1;
else
discount := amount * .05;
end CASE;
END;
WHILE DECLARE
counter number(2) := 10;
BEGIN
WHILE counter < 20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
FOR DECLARE
counter number(2) := 10;
BEGIN
FOR counter IN (REVERSE) 10..20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
Reference
この問題について(PL/SQL Basics), 我々は、より多くの情報をここで見つけました
https://velog.io/@woobuntu/PLSQL-Basics
テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol
-- 한 줄짜리 주석
/*
여러 줄짜리 주석
*/
DECLARE
변수명 변수타입 := 디폴트값;
-- 전역변수
BEGIN
DECLARE
변수명 변수타입 := 디폴트값;
-- 지역변수
BEGIN
END;
END
IF then ELSE DECLARE
변수 타입 := 디폴트값;
BEGIN
if 조건 비교
then -- 참
로직 수행;
else -- 거짓
로직 수행;
end if;
END;
例DECLARE
amount := 101;
discount := 0;
BEGIN
if amount > 200
then
discount := amount * .2;
elsif amount >= 100 and amount <= 200
then
discount := amount * .1;
else
discount := amount * .05;
end if;
END;
CASE DECLARE
amount := 101;
discount := 0;
BEGIN
CASE
WHEN amount > 200
then
discount := amount * .2;
WHEN amount >= 100 and amount <= 200
then
discount := amount * .1;
else
discount := amount * .05;
end CASE;
END;
WHILE DECLARE
counter number(2) := 10;
BEGIN
WHILE counter < 20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
FOR DECLARE
counter number(2) := 10;
BEGIN
FOR counter IN (REVERSE) 10..20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
Reference
この問題について(PL/SQL Basics), 我々は、より多くの情報をここで見つけました
https://velog.io/@woobuntu/PLSQL-Basics
テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol
DECLARE
변수 타입 := 디폴트값;
BEGIN
if 조건 비교
then -- 참
로직 수행;
else -- 거짓
로직 수행;
end if;
END;
DECLARE
amount := 101;
discount := 0;
BEGIN
if amount > 200
then
discount := amount * .2;
elsif amount >= 100 and amount <= 200
then
discount := amount * .1;
else
discount := amount * .05;
end if;
END;
DECLARE
amount := 101;
discount := 0;
BEGIN
CASE
WHEN amount > 200
then
discount := amount * .2;
WHEN amount >= 100 and amount <= 200
then
discount := amount * .1;
else
discount := amount * .05;
end CASE;
END;
WHILE DECLARE
counter number(2) := 10;
BEGIN
WHILE counter < 20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
FOR DECLARE
counter number(2) := 10;
BEGIN
FOR counter IN (REVERSE) 10..20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
Reference
この問題について(PL/SQL Basics), 我々は、より多くの情報をここで見つけました
https://velog.io/@woobuntu/PLSQL-Basics
テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol
DECLARE
counter number(2) := 10;
BEGIN
WHILE counter < 20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
DECLARE
counter number(2) := 10;
BEGIN
FOR counter IN (REVERSE) 10..20
LOOP
dbms_output.put_line('counter : ' || counter);
counter := counter + 1;
END LOOP
END;
Reference
この問題について(PL/SQL Basics), 我々は、より多くの情報をここで見つけました https://velog.io/@woobuntu/PLSQL-Basicsテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol