PostgreSQL

Скачать в pdf «PostgreSQL»


firstname |    lastname    |    city    | state | age


Sandy


| Gleason


| Ocean City


| nj


| 25


Sandy


| Weber


| Boston


| ma


| 33

(2 rows)


test=> — firstname has an e in the second position test=> SELECT * FROM friend test-> WHERE firstname » ‘».e’ test-> ORDER BY firstname;


firstname


| lastname


| city


| state


| age


Dean


| Yeager


| Plymouth


| ma


| 24


Ned


| Millstone


| Cedar Creek


| MD


| 27

(2 rows)


test=> — firstname contains b, B, c, or C test=> SELECT * FROM friend test-> WHERE firstname «* ‘ [bc]’ test-> ORDER BY firstname;


firstname


| lastname


| city


| state


| age


Dick


| Gleason


| Ocean City


| nj


| 19


Victor


| Tabor


| Williamsport


| pa


| 22


(2 rows)

test=> — firstname does not contain s or S test=> SELECT * FROM friend test-> WHERE firstname I»* ‘s’ test-> ORDER BY firstname;


firstname


| lastname


| city


| state


| age


Dean


| Yeager


| Plymouth


| ma


| 24


Dick


| Gleason


| Ocean City


| nj


| 19

Скачать в pdf «PostgreSQL»