1)ORA-00904: "E"."AVG" invalid identifier2)How 2 See Savepoints
1)Friends tell me the reason why this query is giving error
SELECT e.avg(sal) FROM emp e;
Error: ORA-00904: "E"."AVG" invalid identifier
If i give the query as
SELECT avg(sal) FROM emp e;
it works why is this so as i have given the alias name for emp as e than i need to do e.avg(sal)
2)Friends as per my knowledge in the absence of GROUP BY clause HAVING CLAUSE works as WHERE CLAUSE then why is this statement not executing.
SELECT sal FROM emp HAVING sal>3000;
Error: ORA-00979: Not a Group by expression
3)Savepoints
Friends how can i know what are the save points i have given;
example->
SQL>savepoint a;
SQL>savepoint b;
SQL>savepoint c;
And if i want to know what are d savepoints(incase i forgot) i have given what should i do?
1) Syntax error; as you already figure out but probably didn't realize yet AVG() is not a valid column on emp table.
2) Syntax error; HAVING clause works on groups created by GROUP BY clause.
3) What?
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Bookmarks