???SQL?????????
???????????? ???????[ 2013/4/17 9:57:26 ] ????????
????8??????SELECT ??????????RETURNING INTO????
?????????????У?????????????SELECT??????????????RETURNING??????????????????RETURNING coloumn_name INTO ??????????DML????????????????????????????
DECLARE
sql_stat VARCHAR2(200);
v_empno tb2.empno%TYPE := &eno;
v_ename tb2.ename%TYPE;
BEGIN
sql_stat := 'SELECT ename FROM tb2 WHERE empno =:eno
RETURNING ename INTO :v_ename ';
EXECUTE IMMEDIATE sql_stat
USING v_empno
RETURNING INTO v_ename;
DBMS_OUTPUT.PUT_LINE('The employee name is ' || v_ename);
END;
?????????
?????????SQL????е?RETURNING coloumn_name INTO????????EXECUTE IMMEDIATE?????????INTO????????????
DECLARE
sql_stat VARCHAR2(200);
v_empno tb2.empno%TYPE := &eno;
v_ename tb2.ename%TYPE;
BEGIN
sql_stat := 'SELECT ename FROM tb2 WHERE empno =:eno';
-- RETURNING ename INTO :v_ename '; --???RETURNING???
EXECUTE IMMEDIATE sql_stat
INTO v_ename --????INTO?????????????
USING v_empno;
--RETURNING INTO v_ename; --???RETURNING???
DBMS_OUTPUT.PUT_LINE('The employee name is ' || v_ename);
END;
???????????
????1???????DDL?????????e?????????y?????????????SQL?????????????????
????2?????????schema?????????????????schema??????????SQL?????????????????
????3?????SQL?鯔????÷?????(;)??
????4?????PL/SQL?鯔???????б?????????飬??????β?????????÷??(;)??
????5???????????????????????USING NULL?????????????????????????????δ????????????????????
????6?????????????????????????????????????????????
????7??????????????????SQL?д????????????????????????????????????????chr(39)???????????á?
????8?????SQL??RETURNING INTO????DML??????????????SELECT?????????????????EXECUTE IMMEDIATE?????????INTO??????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11