diff --git a/crud.html b/crud.html index 2a743f08..5939c36b 100644 --- a/crud.html +++ b/crud.html @@ -986,7 +986,7 @@ db.Table("users").Select("JOIN emails ON emails.user_id = users.id AND emails.email = ?", "jinzhu@example.org").Joins("JOIN credit_cards ON credit_cards.user_id = users.id").Where("credit_cards.number = ?", "411111111111").Find(&user)

Pluck

-

Query single column from a model as a map, if you want to query multiple columns, you could use Scan

+

Query single column from a model as a slice, if you want to query multiple columns, you could use Scan

var ages []int64
 db.Find(&users).Pluck("age", &ages)