Skip to Main Content

Oracle PL/SQL Einzel-Tipp ansehen

Hier sehen Sie unseren PL/SQL-Tipp „Datentypen CAST”.

Datentypen CAST

Tipp 111

  Thema: DEKLARATION
  Datenbank-Version: 12.1, 12.2
  Erstellt am 03.12.19
  Bearbeitet am 03.12.19
Oracle hat leider (noch ) keinen Datentyp Boolean.
SELECT CAST('123,45' AS BINARY_DOUBLE) FROM dual;
SELECT CAST('123,45' AS BINARY_FLOAT) FROM dual;
SELECT CAST('123,45' AS NUMBER ) FROM dual;
SELECT CAST('123' AS INTEGER) FROM dual;

SELECT CAST ('31.12.2019' as DATE) FROM dual;
SELECT CAST ('31.12.2019' AS TIMESTAMP) FROM dual;

SELECT CAST(123.45 AS VARCHAR(8)) FROM dual;
SELECT CAST(123.45 AS VARCHAR2(8)) FROM dual;
SELECT CAST(123.45 AS CHAR(7)) FROM dual;

SELECT CAST('ABC' AS raw(8)) from dual;

Wussten Sie schon, dass wir auch Schulungen zu Oracle PL/SQL anbieten?