Home > database >  For help, the comrades to help me what's the difference between two SQL statements under analys
For help, the comrades to help me what's the difference between two SQL statements under analys

Time:10-03

I want to use the second statement force department name KSMC KSDM replace the statement 1 department code, other unchanged,
Article but the records of the results of the query statement 2 is much less, bother everybody to help me to analyse the, thank you,!

The select fyxh, fymc ZXKS, sum (fysl), fydj, sum (zjje) from zy_fymx_cy
Where fyrq & gt; To_date (' 2008-1-1 00:00:00 ', '- dd yyyy - mm hh24: mi: ss')
And fyrq & lt; To_date (' 2008-2-1 00:00:00 ', '- dd yyyy - mm hh24: mi: ss')
And fyxh in (select fyxh from temp)
Group by fyxh fymc, ZXKS fydj;

The select a.f yxh, a.f ymc, b.k SMC, the sum (a.f ysl), a.f ydj, sum (a.z jje) from zy_fymx a, gy_ksdm b
Where a.f yrq & gt; To_date (' 2008-1-1 00:00:00 ', '- dd yyyy - mm hh24: mi: ss')
And a.f yrq & lt; To_date (' 2008-2-1 00:00:00 ', '- dd yyyy - mm hh24: mi: ss')
And a.f yxh in (select temp. Fyxh from temp)
And a.z XKS=b.k SDM
Group by a.f yxh, a.f ymc, b.k SMC, a.f ydj;

CodePudding user response:

The from zy_fymx_cy
The from zy_fymx a, gy_ksdm b

Is not a table, can have no difference!

CodePudding user response:

With the LS, different table

Zy_fymx table can ZXKS one-to-one correspondence to the gy_ksdm KSDM in a table?

CodePudding user response:

I also want to know, is looking for this information ~ ~ ~ ~ ~
  • Related