我在下面有这个查询,但是当我执行sqlplus / nolog
时会抛出异常SELECT 'EXEC DROP_CONSTRAINTS('TK_TYUOICE_REWOURCE','WQEA_INVOTRY');' FROM DUAL
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
SELECT 'ALTER TABLE WQEA_INVOTRY ADD CONSTRAINT TK_TYUOICE_REWOURCE CHECK (SOURCE_SYSTEM IN ('WER','TYU'));' FROM DUAL
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
答案 0 :(得分:0)
您需要转义字符串中的单引号。为此,只需加倍:
SELECT 'EXEC DROP_CONSTRAINTS(''TK_TYUOICE_REWOURCE'', ''WQEA_INVOTRY'');'
FROM DUAL