oracle - Display value from list even if record doesn't exist in the database -
This is a strange case where I would like to display my test table content with all the list values i.e. counters.
name, misc a, blah b, 123 a, asd Now, this query will only bring results for A and B, but how can I show the result of "C" Select the name, count (*) from the table where the name ('A', 'B', 'C') is
The result I'm already crazy for a day.
a2b1c please help
cheers, donation
I think that you are joining the external for this type of query like:
as my list ( Select 'A' from dual union 'B' with two pairs 'Select' from 'C') Select L.name, COUNT (tnn) mylist on mytable t from l from IME L.name = t.name GROUP by l.name You can use a table object Union All:
VARCHAR2 (30) Field enter the name as the tab _list_t; / SELECT l.name, COUNT (T.name) FROM (tab in column name (list_list_t ('a', 'b', 'c')) with select column_volution Liefine I L.name < / Div>
Comments
Post a Comment