Skip to content

Commit

Permalink
example
Browse files Browse the repository at this point in the history
  • Loading branch information
nwoolmer committed Dec 4, 2024
1 parent 4427545 commit 82124ba
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion documentation/reference/sql/declare.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,21 @@ FILL(NULL);
```questdb-sql
INSERT INTO trades SELECT * FROM
(
DECLARE @x := now(), @y := 'ETH-USD'
DECLARE
@x := now(),
@y := 'ETH-USD'
SELECT @x as timestamp, @y as symbol
);
```

### CREATE TABLE AS SELECT

```questdb-sql
CREATE TABLE trades AS (
DECLARE
@x := now(),
@y := 'ETH-USD'
SELECT @x as timestamp, @y as symbol, 123 as price
);
```

0 comments on commit 82124ba

Please sign in to comment.