The Colon in SQL
413461Mar 21 2004 — edited Mar 22 2004Hi,
First of all, I'm a kind of a newbie at SQL - I studies it many, many years ago but never got a chance to use it...until now, so I'm very rusty. Anyway, I'm looking at the example of using ODP .NET to store and retrieve data - I'm a bit puzzled by this step.
// Step 3
// Create Anonymous PL/SQL block string
String block = " BEGIN " +
" INSERT INTO testblob (id, photo) VALUES (100, :1); "
+
" SELECT photo into :2 from testblob WHERE id = 100; "
+
" END; ";
It's a C# code to insert 2 data into the table "testblob" with id = 100 and photo is, I assumed referenced by the :1 as it's a large data type. I'm not sure what the colons and its usage are in this case - the :1 and :2
The whole code is at
http://otn.oracle.com/sample_code/tech/windows/odpnet/howto/anonyblock/index.html
My apologies for what must be a trivial question for Oracle users, but as I said, I'm just kind of getting back into things again, very slowly....
Thanks