CREATE TABLE emp
(
empno NUMBER(4, 0),
ename VARCHAR2(10 CHAR),
job VARCHAR2(9 CHAR),
mgr NUMBER(4, 0),
hiredate DATE,
sal NUMBER(7, 2),
comm NUMBER(7, 2),
deptno NUMBER(2, 0),
CONSTRAINT pk_emp PRIMARY KEY(empno)
);
INSERT INTO emp
VALUES (10,
‘scott’,
‘xx’,
100,
to_date(‘01.01.2018’, ‘dd.mm.yyyy’),
1000,
2000,
3);
SELECT empno
FROM emp
WHERE ename = ‘scott’
FETCH FIRST ROW ONLY;
leads to syntax error but executes perfectly.