Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Kokeillaan seuraavaksi muutamia SELECT-lauseita. Suorita kukin lause erikseen.

SELECT ID, NAME, SALARY

FROM COMPANY

WHERE SALARY<40000;

 

SELECT *

FROM COMPANY

WHERE AGE >= 25 AND SALARY >= 65000;

 

SELECT *

FROM COMPANY

WHERE AGE >= 25 OR SALARY >= 65000;

 

Lasketaan kuinka monella henkilöllä on sama osoite:

SELECT ADDRESS, COUNT (*)

FROM COMPANY

GROUP BY ADDRESS;

 

 

Lisää esimerkkejä SELECT-lauseista löydät Tutorialista.

...