WPMarcelek

Zadania SELECT

Nov 30th, 2021
2,029
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- SELECT * FROM Samochody order by rocznik desc, spalanie asc
  2. -- SELECT * FROM samochody where marka in ('Honda','Mazda') and spalanie between 9 and 11
  3. -- SELECT * FROM samochody where kolor='czerwony' and marka like '___%'
  4. -- SELECT * FROM samochody where cena is not null
  5. -- SELECT * FROM samochody where kolor in ('niebieski','zielony') and cena is not null order by marka asc, spalanie desc
  6. -- SELECT * FROM samochody where model like '_o%'
  7. -- UPDATE samochody SET kolor='zółty' where kolor='żółty'
  8.  
  9. -- SELECT * FROM samochody where spalanie between 5 and 10 and kolor not in ('różowy','fioletowy')
  10. -- SELECT * FROM kierowca where imie not like '%a' and imie not in ('Kuba','Jennefer','Karen','Alice')
  11. -- SELECT * FROM kierowca where imie like '%a' and imie in ('Jennefer','Karen','Alice') and imie not in ('Kuba')
  12. -- SELECT * FROM samochody where marka in ('Mercedes','BMW') and spalanie>9 order by marka asc, spalanie desc
  13. -- SELECT * FROM kierowca where miasto in ('Kraków','Łask')
  14. -- SELECT marka, model, spalanie, kolor FROM samochody where marka in ('Ford','Fiat') and spalanie between 7 and 12
  15. -- SELECT distinct marka FROM samochody
  16. -- SELECT * FROM samochody where model like '__0'
  17. -- SELECT * FROM samochody where kolor='czarny' and spalanie>10 order by spalanie desc
  18.  
  19.  
RAW Paste Data