How to write such a stored function in MySQL?
- by user198729
The function essentially contains 2 statements:
statement1; and statement2;
If statement1 fetches some records,just return them as result;If it doesn't fetch any result,return the result of statement2.