==========Advise==========
@martin clayton Answer is correct, But this is an advise only.
Please avoid the use of ambiguous variable in the stored procedure.
Example :
SELECT Id, dateCreated
INTO id, datecreated
FROM products
WHERE pName = iName
The above example will cause an error (null value error)
Example give below is correct. I hope this make sense.
Example :
SELECT Id, dateCreated
INTO val_id, val_datecreated
FROM products
WHERE pName = iName
You can also make them unambiguous by referencing the table, like:
[ Credit : maganap ]
SELECT p.Id, p.dateCreated INTO id, datecreated FROM products p
WHERE pName = iName