PLSQL error - ORA-00984: column not allowed here

后端 未结 2 883
-上瘾入骨i
-上瘾入骨i 2021-01-28 23:04

I have written a PL-SQL block

DECLARE
    SchemaName  VARCHAR2(50) :=\'REQ_SUNIL_5750\';
    userpassword VARCHAR2(50) :=\'XYZ\';  
    stmt VARCHAR2(5000);
BEG         


        
2条回答
  •  再見小時候
    2021-01-28 23:28

    You have to quote your string values properly:

    stmt :='INSERT INTO ' || SchemaName || 
      '.USER_CREDS VALUES ('''|| SchemaName ||''', '''|| userpassword ||''' )';
    

提交回复
热议问题