I need to add a 'all' company type in my result for a drop down list, however the order in which the "all" company is showing is at position 8 or 9 and I want 'all' to show up at position 0 in the result order.
this is what I have s far:
SELECT COM_ID, COM_SHORT_NAME FROM TBLCOMPANY
SELECT 0 AS COM_ID, 'ALL' AS COM_SHORT_NAME FROM DUAL
ORDER BY CASE 2 WHEN 'ALL' THEN 1 END ASC;
Truncate is a DDL Command where as Delete is a DML Command.
Both will delete data from table, but what is the difference between these below statements
truncate table <table_name> ??
delete from <table_name> ??
The first command cannot be …
How to Create User-Defined Aggregates in Oracle
Before we begin creating these things, what are user-defined aggregates? They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…