简体   繁体   中英

How to pass variable value inside the name of a parameter in Oracle SQL?

So I want to drop a sequence in Oracle SQL and the sequence name holds a variable that I need to pass to the SQL script. So I was writing like the following. For testing in SQLplus, I declared the variable like this and after that I tried to use the variable value in the SQL:

在此处输入图片说明

序列删除失败

But as you see the enclosing single quotes are creating the problem. I tried to not give the quotes, but then it asks for the values. I tried to escape them, but still they remained. So in this case, how can I pass the parameter to the SQL?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM