mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
add example code for count(1)
in Functions.md (#412)
* add doc for `count(1)`
This commit is contained in:
parent
9b8463b1f6
commit
eb48909721
@ -35,6 +35,11 @@ for (const auto& row : db(select(tab.name, avg(tab.value))
|
||||
}
|
||||
```
|
||||
|
||||
Use `count(1)` for simply query row count:
|
||||
```C++
|
||||
const int64_t n = db(select(count(1)).from(tab).unconditionally()).front().count;
|
||||
```
|
||||
|
||||
# Text Functions
|
||||
## concat
|
||||
Just use the + operator :-)
|
||||
|
Loading…
Reference in New Issue
Block a user