SQL*Plus how to accept text variable from prompt?

后端 未结 3 1204
挽巷
挽巷 2020-11-30 13:07

Im very beginner in psql and i have a question.

Here is the code:

SET serveroutput ON
ACCEPT myVariable PROMPT \"Input value: \";

BEGIN
  dbms_outpu         


        
3条回答
  •  既然无缘
    2020-11-30 13:27

    You have to specify the data type as part of the ACCEPT statement. If none is given, it assumes a number.

    Try ACCEPT myVariable CHAR PROMPT 'Input value: '; instead.

提交回复
热议问题