Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
union
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Editor:
CodeMirror
EditArea
Simple
Layout:
Vertical
Horizontal
drop table if exists t1 cascade; drop table if exists t2 cascade; create table t1 (id integer); create table t2 (id integer); insert into t1 values (1),(2),(3),(4),(5); insert into t2 values (10),(20),(30),(40),(50); with data as ( ( select * from t1 order by id desc fetch first 2 rows only ) union all select * from t2 ) select * from data order by id asc;
absolute service time: 0,53 sec
edit mode
|
history
id
1
4
2
5
3
10
4
20
5
30
6
40
7
50