mirror of
https://github.com/jbranchaud/til
synced 2026-01-02 22:58:01 +00:00
Add sql tags to the code blocks.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
Assuming I have a database with a posts table:
|
||||
|
||||
```
|
||||
```sql
|
||||
> select * from posts where id = 1;
|
||||
id | title | content
|
||||
----+----------+------------------------------------
|
||||
@@ -11,7 +11,7 @@ Assuming I have a database with a posts table:
|
||||
|
||||
I can compute the word count of the content of a given post like so:
|
||||
|
||||
```
|
||||
```sql
|
||||
> select sum(array_length(regexp_split_to_array(content, '\s+'), 1)) from posts where id = 1;
|
||||
sum
|
||||
-----
|
||||
|
||||
Reference in New Issue
Block a user