문제

What is the meaning of this code and what do you call this method? How will I know what is the value for :1, :2, :3 and so on?


(PL/SQL Procedure)

UPDATE tablename
SET column = :1, column = :2, column = :3, column = :4, column= :5....
도움이 되었습니까?

해결책

Those are bind variables. Oracle substitutes them for actual values which are passed. These are generally found when you're using Dynamic SQL, EXECUTE-IMMEDIATE, OR OPEN-FOR-USING as mentioned by Phil.

If you want to know what values are being held there, you probably would wnat to look up where the UPDATE statements are being issued & log them to a logging/debugging table just before the UPDATE statement is issued

다른 팁

Is this in SQL*Plus?

If so, they are parameter placeholders. SQL*Plus will prompt you for values upon execution.

If you're coming from a SQL client / programming language (Java, PHP, C#, etc) these would usually represent parameters in a prepared statement though I'm not sure if digit only placeholders are valid.

Update

This can also appear in dynamic SQL executed using an OPEN-FOR-USING statement. Without seeing more of your code, I'm only guessing.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top