ORA-01756: quoted string not properly terminated when I try to execute my code

前端 未结 3 1738
[愿得一人]
[愿得一人] 2021-01-18 08:34

I keep getting the following message every time I try to run this code in oracle. The code is as follows:

DROP TABLE movie;
CREATE TABLE movie (movie_id NUMB         


        
3条回答
  •  遥遥无期
    2021-01-18 08:56

    Try Oracle's quoting mechanisms :

    The mechanism is invoked with a simple "q" in PL/SQL only.

    The syntax is q'[...]', where the "[" and "]" characters can be any of the following as long as they do not already appear in the string.

    •!

    •[ ]

    •{ }

    •( )

    •< >

    Here For Example ,

    INSERT INTO movie (movie_id, title, description, released_by, released_on)
    VALUES('4', 'Godzilla', q'[The legendary tale of Godzilla comes roaring back to
     life. This time, it's the modern era, and Godzilla is a giant lizard who has
     been made fearsome through the interference of radiation.]', '1', '16-SEP-
    2014');
    

    It's always headache to find all single quotes and replace it with escape character.

    For more Reference Follow : THIS

提交回复
热议问题