# 14.2.1dbGetQuery(mydb,"SELECT cust_name, cust_contact, cust_emailFROM CustomersWHERE cust_state IN ('IL','IN','MI');")
cust_name cust_contact cust_email
1 Village Toys John Smith sales@villagetoys.com
2 Fun4All Jim Jones jjones@fun4all.com
3 The Toy Store Kim Howard kim@thetoystore.com
cust_name cust_contact cust_email
1 Fun4All Denise L. Stephens dstephens@fun4all.com
2 Fun4All Jim Jones jjones@fun4all.com
3 The Toy Store Kim Howard kim@thetoystore.com
4 Village Toys John Smith sales@villagetoys.com
# Source: SQL [4 x 3]
# Database: sqlite 3.46.0 [D:\数据库技术及应用\R4SQL\data\TYSQL.sqlite]
cust_name cust_contact cust_email
<chr> <chr> <chr>
1 Fun4All Denise L. Stephens dstephens@fun4all.com
2 Fun4All Jim Jones jjones@fun4all.com
3 The Toy Store Kim Howard kim@thetoystore.com
4 Village Toys John Smith sales@villagetoys.com
dbGetQuery(mydb,"SELECT cust_name, cust_contact, cust_emailFROM CustomersWHERE cust_state IN ('IL','IN','MI') OR cust_name = 'Fun4All';")
cust_name cust_contact cust_email
1 Village Toys John Smith sales@villagetoys.com
2 Fun4All Jim Jones jjones@fun4all.com
3 Fun4All Denise L. Stephens dstephens@fun4all.com
4 The Toy Store Kim Howard kim@thetoystore.com
# Source: SQL [4 x 3]
# Database: sqlite 3.46.0 [D:\数据库技术及应用\R4SQL\data\TYSQL.sqlite]
cust_name cust_contact cust_email
<chr> <chr> <chr>
1 Village Toys John Smith sales@villagetoys.com
2 Fun4All Jim Jones jjones@fun4all.com
3 Fun4All Denise L. Stephens dstephens@fun4all.com
4 The Toy Store Kim Howard kim@thetoystore.com
cust_name cust_contact cust_email
1 Village Toys John Smith sales@villagetoys.com
2 Fun4All Jim Jones jjones@fun4all.com
3 The Toy Store Kim Howard kim@thetoystore.com
4 Fun4All Jim Jones jjones@fun4all.com
5 Fun4All Denise L. Stephens dstephens@fun4all.com
# Source: SQL [5 x 3]
# Database: sqlite 3.46.0 [D:\数据库技术及应用\R4SQL\data\TYSQL.sqlite]
cust_name cust_contact cust_email
<chr> <chr> <chr>
1 Village Toys John Smith sales@villagetoys.com
2 Fun4All Jim Jones jjones@fun4all.com
3 The Toy Store Kim Howard kim@thetoystore.com
4 Fun4All Jim Jones jjones@fun4all.com
5 Fun4All Denise L. Stephens dstephens@fun4all.com
# 14.2.4dbGetQuery(mydb,"SELECT cust_name, cust_contact, cust_emailFROM CustomersWHERE cust_state IN ('IL','IN','MI')UNIONSELECT cust_name, cust_contact, cust_emailFROM CustomersWHERE cust_name = 'Fun4All'ORDER BY cust_name, cust_contact;")
cust_name cust_contact cust_email
1 Fun4All Denise L. Stephens dstephens@fun4all.com
2 Fun4All Jim Jones jjones@fun4all.com
3 The Toy Store Kim Howard kim@thetoystore.com
4 Village Toys John Smith sales@villagetoys.com
# Source: SQL [4 x 3]
# Database: sqlite 3.46.0 [D:\数据库技术及应用\R4SQL\data\TYSQL.sqlite]
# Ordered by: cust_name, cust_contact
cust_name cust_contact cust_email
<chr> <chr> <chr>
1 Fun4All Denise L. Stephens dstephens@fun4all.com
2 Fun4All Jim Jones jjones@fun4all.com
3 The Toy Store Kim Howard kim@thetoystore.com
4 Village Toys John Smith sales@villagetoys.com