From
the manual: "Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored". The
return
statement doesn't generate a rowset output, therefore ExecuteScalar can't read the result