Home > database >  A demand for special SQL statements (QRACLE)
A demand for special SQL statements (QRACLE)

Time:09-25

For an SQL statement, the code is as follows:
select * from A where X

Excuse me X why value can be output

Results the b1, select count (*) from group B by b1


Note: all I want is the output results of the B table but red code is fixed, A table can only change the value of X implementation

CodePudding user response:

I tried X value of 1=2 join... , 1=2 union... And so on all can't meet the
The great god know what connection table B output

CodePudding user response:

From my understanding, your data source is red part A, and is fixed, you can only pass X is narrow A range of available, and the associative table is not you,

CodePudding user response:

No feeling,,,

CodePudding user response:

refer to the second floor alex259 response:
from my understanding, your data source is red part A, and is fixed, you can only pass X is narrow A range of available, and the associative table is not you,


Well is like you said,,, but I actually A table B table is the same table, but in this statement is no logical connection, I was directly two names.

CodePudding user response:

Even if the same table also shows the number of columns or a number of columns, not only present two columns, unless you specify the count under which column column of figures shows that the rest of the field is empty

CodePudding user response:

reference 4 floor Juedaifanghua response:
Quote: refer to the second floor alex259 response:

From my understanding, your data source is red part A, and is fixed, you can only pass X is narrow A range of available, and the associative table is not you,


Well is like you said,,, but I actually A table B table is the same table, but in this statement is no logical connection, I was directly two names.


You might as well put your data structures, and then stick target result sets out, everybody is good

CodePudding user response:

The red part of the fixed words can only query A table of data,

CodePudding user response:

B table data can't statistics, needs no solution, appraisal end!

CodePudding user response:

What a great god make of demand, can't play!

CodePudding user response:

reference 1st floor Juedaifanghua response:
I tried X value of 1=2 join... , 1=2 union... And so on all can't meet the
The great god know what connection table B of output


* is query all the columns, and b1, count (*) the two results is unequal, the union disconnected

CodePudding user response:

Look at your description, the feeling is no solution ~
what is your business scenario? There must be some other alternative methods

CodePudding user response:

How to condition nor the count (*) the aggregate values, is A, B is the same table

CodePudding user response:

No solution if you can select * Y o the from A where clause X it can think it over,
  • Related