Skip to content

Commit 82124ba

Browse files
committed
example
1 parent 4427545 commit 82124ba

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

documentation/reference/sql/declare.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,21 @@ FILL(NULL);
248248
```questdb-sql
249249
INSERT INTO trades SELECT * FROM
250250
(
251-
DECLARE @x := now(), @y := 'ETH-USD'
251+
DECLARE
252+
@x := now(),
253+
@y := 'ETH-USD'
252254
SELECT @x as timestamp, @y as symbol
253255
);
254256
```
257+
258+
### CREATE TABLE AS SELECT
259+
260+
```questdb-sql
261+
CREATE TABLE trades AS (
262+
DECLARE
263+
@x := now(),
264+
@y := 'ETH-USD'
265+
SELECT @x as timestamp, @y as symbol, 123 as price
266+
);
267+
```
268+

0 commit comments

Comments
 (0)