sql >> Database teknologi >  >> RDS >> Oracle

Oracle SQL:Hvordan returnerer flere forskellige kolonner

Prøv dette

 SELECT MIN(I.INCIDENTID)               AS "Incident ID",
        I.CREATIONDATE                  AS "Creation Date",
        MO.IPADDRESS                    AS "IP Address",
        MO.DOMAINUSERNAME               AS "Login ID",
        MO.ENDPOINTMACHINENAME          AS "Computer Name",
        M.MESSAGESUBJECT                AS "Email Subject"
   FROM MESSAGE M,
        INCIDENT I,
        MESSAGEORIGINATOR MO
  WHERE M.MESSAGESOURCE = 'ENDPOINT'
    AND M.MESSAGESOURCE = I.MESSAGESOURCE
    AND M.MESSAGEID = I.MESSAGEID
    AND M.MESSAGEDATE = I.MESSAGEDATE 
    AND M.MESSAGEORIGINATORID = MO.MESSAGEORIGINATORID 
    AND I.ISDELETED = 0
  GROUP BY I.CREATIONDATE, MO.IPADDRESS, MO.DOMAINUSERNAME, MO.ENDPOINTMACHINENAME,M.MESSAGESUBJECT


  1. MySQL Konverter ROW_NUMBER() OVER PARTITION

  2. PDO:Cost of Calling prepare() in a loop?

  3. Brug for hjælp til at sammenkæde oracle-tabeller i MS Access

  4. Advarsel:mysql_query():det leverede argument er ikke en gyldig MySQL-Link-ressource