CREATE TABLE NUMBERS (
x NUMBER,
name VARCHAR2(30)
)
Table created.
INSERT INTO NUMBERS (x, name) VALUES (1, 'eins')
1 row(s) inserted.
INSERT INTO NUMBERS (x, name) VALUES (2, 'zwei')
1 row(s) inserted.
INSERT INTO NUMBERS (x, name) VALUES (3, 'drei')
1 row(s) inserted.
INSERT INTO NUMBERS (x, name) VALUES (4, 'vier')
1 row(s) inserted.
INSERT INTO NUMBERS (x, name) VALUES (5, 'fünf')
1 row(s) inserted.
INSERT INTO NUMBERS (x, name) VALUES (6, 'sechs')
1 row(s) inserted.
INSERT INTO NUMBERS (x, name) VALUES (7, '')
1 row(s) inserted.
INSERT INTO NUMBERS (x, name) VALUES (8, null)
1 row(s) inserted.
COMMIT
Statement processed.
SELECT * FROM NUMBERS
X | NAME | 1 | eins | 2 | zwei | 3 | drei | 4 | vier | 5 | fünf | 6 | sechs | 7 | - | 8 | - |
---|
SELECT n.x,
n.x + 1,
n.x - 1,
n.x * 2,
n.x / 2
FROM NUMBERS n
X | N.X+1 | N.X-1 | N.X*2 | N.X/2 | 1 | 2 | 0 | 2 | .5 | 2 | 3 | 1 | 4 | 1 | 3 | 4 | 2 | 6 | 1.5 | 4 | 5 | 3 | 8 | 2 | 5 | 6 | 4 | 10 | 2.5 | 6 | 7 | 5 | 12 | 3 | 7 | 8 | 6 | 14 | 3.5 | 8 | 9 | 7 | 16 | 4 |
---|
SELECT *
FROM NUMBERS n
WHERE n.x = 1
X | NAME | 1 | eins |
---|
SELECT *
FROM NUMBERS n
WHERE n.x <> 1
X | NAME | 2 | zwei | 3 | drei | 4 | vier | 5 | fünf | 6 | sechs | 7 | - | 8 | - |
---|
SELECT *
FROM NUMBERS n
WHERE n.x > 5
X | NAME | 6 | sechs | 7 | - | 8 | - |
---|
SELECT *
FROM NUMBERS n
WHERE n.x >= 5
X | NAME | 5 | fünf | 6 | sechs | 7 | - | 8 | - |
---|
SELECT *
FROM NUMBERS n
WHERE n.x < 3
X | NAME | 1 | eins | 2 | zwei |
---|
SELECT *
FROM NUMBERS n
WHERE n.x <= 3
X | NAME | 1 | eins | 2 | zwei | 3 | drei |
---|
SELECT *
FROM NUMBERS n
WHERE n.x BETWEEN 2 AND 5
X | NAME | 2 | zwei | 3 | drei | 4 | vier | 5 | fünf |
---|
SELECT *
FROM NUMBERS n
WHERE n.name LIKE 's%'
X | NAME | 6 | sechs |
---|
SELECT *
FROM NUMBERS n
WHERE n.name LIKE '%ei%'
X | NAME | 1 | eins | 2 | zwei | 3 | drei |
---|
SELECT *
FROM NUMBERS n
WHERE n.name LIKE 'dr_i'
X | NAME | 3 | drei |
---|
SELECT *
FROM NUMBERS n
WHERE n.name LIKE 'dr_i'
X | NAME | 3 | drei |
---|
SELECT *
FROM NUMBERS n
WHERE n.name LIKE '%'
X | NAME | 1 | eins | 2 | zwei | 3 | drei | 4 | vier | 5 | fünf | 6 | sechs |
---|
SELECT *
FROM NUMBERS n
WHERE n.name IS NULL
X | NAME | 7 | - | 8 | - |
---|
SELECT *
FROM NUMBERS n
WHERE n.name IS NOT NULL
X | NAME | 1 | eins | 2 | zwei | 3 | drei | 4 | vier | 5 | fünf | 6 | sechs |
---|