1 Reply Latest reply: Jul 29, 2013 4:46 AM by rukbat RSS

    sql help

    aa9c0046-3b1d-4e77-a645-da9b2b162552

      below is the table creation

      CREATE TABLE Test
      ( idname number (5),
      ename varchar2(50))

      below is insert data statement

      insert into test (idname , ename) values (1, 'A1');
      insert into test (idname , ename) values (2, 'A2');
      insert into test (idname , ename) values (3, 'B1');
      insert into test (idname , ename) values (4, 'B2');
      insert into test (idname , ename) values (5, 'C1');
      insert into test (idname , ename) values (6, 'C2');
      insert into test (idname , ename) values (7, 'D1');
      insert into test (idname , ename) values (8, 'D2');
      insert into test (idname , ename) values (9, 'E1');
      insert into test (idname , ename) values (10, 'E2');




      Below is simple select * from Test
      idname ename
      1 1 A1
      2 2 A2
      3 3 B1
      4 4 B2
      5 5 C1
      6 6 C2
      7 7 D1
      8 8 D2
      9 9 E1
      10 10 E2



      I am ask you friends to help me to write an sql from Test table that will result the below

      ename1 ename2
      A1 A2

      B1 B2

      C1 C2

      D1 D2

      E1 E2