Oracle statement merge issues

Updated on technology 2024-04-04
5 answers
  1. Anonymous users2024-02-07

    Select ID, Max(Case Line When.)'Lines'then type else 0 end ) line, max(case line when'Temperature'then type else 0 end ) temperature, max(case line when'Contrast'then type else 0 end ) contrast, max(case line when'Style'then type else 0 end ) style, max(case line when'Body type'then type else 0 end ) body type, from Table A

    group by id

  2. Anonymous users2024-02-06

    select id,max(case when line = 'Lines' then type else null end),max(case when line = 'Temperature' then type else null end),max(case when line = 'Contrast' then type else null end),max(case when line = 'Style' then type else null end),max(case when line = 'Body type' then type else null end)

    from tab

    group by id

  3. Anonymous users2024-02-05

    select, as style, as line, as body type, as temperature, as contrast from Table A

    Left Join Table B

    on and 'Lines'

    Left Join Table C

    on and 'Body type'

    Left Join Table D

    on and 'Temperature'

    Left Join Table E

    on and 'Contrast'

    where 'Style'

  4. Anonymous users2024-02-04

    18608 Lines Straight.

    You're wrong.

  5. Anonymous users2024-02-03

    1. Chuangfu Yinjian class table and student incentive table.

    <>2. View logic.

    3、sqlselect *

    from t_class t1

    inner join (select ,,max( as latest Ming Hall Shed leave time,max( as latest return to school,sum(case

    when is not null thenelse

    end) as Leave of absence,sum(casewhen is not null thenelse.

    end) as Number of students returning to school.

    from t_student t

    group by , t2

    on =and =

    and =

Related questions
4 answers2024-04-04

Oracle does not have SQL statement backup, only exp export or RMAN backup, are not SQL, RMAN is a standard block backup, the premise is that the database must be archived, and then RMAN backup can be carried out, this method can be used for databases with a large amount of data, the speed will be relatively fast, the specific method can be checked from the Internet, it is not very difficult, but it is more cumbersome, there is an exp export, this is to directly export the table in the database to the city dmp file, The specific syntax is: >>>More

4 answers2024-04-04

The solution is as follows: 1. The create global temporary table t temp statement is to create a temporary table, there are two kinds of temporary tables created in oracle, one is transaction-level and the other is session-level, when the creation of temporary table statement is followed by on commit delete rows, it means that the temporary table is transaction-level, and when on commit preserve rows it means that the temporary table is session-level. >>>More

5 answers2024-04-04

F get domain contrast is a formatting function (should be written by yourself), the first parameter (arg prod spec id) according to the second parameter (120) formatting and return the result to the v bill code, according to the function naming method, the above ** should be the standard format for getting the date.

9 answers2024-04-04

You can simply use the SQL statement query result merging method. select * from a union all select * from b union all select * from c

4 answers2024-04-04

Generally refers to indexing. You don't have to.