Guest User

Untitled

a guest
Aug 10th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 4.92 KB | None | 0 0
  1. -- Types test
  2. ALTER system archive LOG CURRENT;
  3. CREATE TABLE tester_src.typestest
  4. (
  5.     f1     VARCHAR2(32),
  6.     f2     nvarchar2(32),
  7.     f3     VARCHAR(32),
  8.     f4     CHAR(32),
  9.     f5     nchar(32),
  10.     f6     NUMBER,
  11.     f7     LONG,
  12.     f8     DATE,
  13.     f9     TIMESTAMP,
  14.     f10    TIMESTAMP WITH TIME ZONE,
  15.     f11    RAW(32),
  16.     f12    clob,
  17.     f13    nclob,
  18.     f14    blob,
  19.     f15    xmltype,
  20.     f16    binary_double,
  21.     f17    FLOAT(8),
  22.     f18    binary_float
  23. );
  24. ALTER system archive LOG CURRENT;
  25. INSERT INTO tester_src.typestest
  26.      VALUES (
  27.                 '12345678901234567890123456789012',
  28.                 '12345678901234567890123456789012',
  29.                 '12345678901234567890123456789012',
  30.                 '12345678901234567890123456789012',
  31.                 '12345678901234567890123456789012',
  32.                 DBMS_RANDOM.VALUE(),
  33.                 DBMS_RANDOM.string('a', 4000),
  34.                 CURRENT_DATE,
  35.                 CURRENT_TIMESTAMP,
  36.                 CURRENT_TIMESTAMP,
  37.                 '1122334455667788990011223344556677889900112233445566778899001122',
  38.                 DBMS_RANDOM.string('a', 4000),
  39.                 DBMS_RANDOM.string('a', 4000),
  40.                 '112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900',
  41.                 XMLType(
  42.                     '<Warehouse whNo="100"><Building>Owned</Building></Warehouse>'),
  43.                 to_binary_double(1.00002),
  44.                 0.123,
  45.                 to_binary_float(1.2));
  46. ALTER system archive LOG CURRENT;
  47. ALTER TABLE tester_src.typestest add (a1 VARCHAR2(32));
  48. ALTER TABLE tester_src.typestest add (a2 nvarchar2(32));
  49. ALTER TABLE tester_src.typestest add (a3 VARCHAR(32));
  50. ALTER TABLE tester_src.typestest add (a4 CHAR(32));
  51. ALTER TABLE tester_src.typestest add (a5 nchar(32));
  52. ALTER TABLE tester_src.typestest add (a6 NUMBER);
  53. ALTER TABLE tester_src.typestest add (a8 DATE);
  54. ALTER TABLE tester_src.typestest add (a9 TIMESTAMP);
  55. ALTER TABLE tester_src.typestest add (a10 TIMESTAMP WITH TIME ZONE);
  56. ALTER TABLE tester_src.typestest add (a11 RAW(32));
  57. ALTER TABLE tester_src.typestest add (a12 clob);
  58. ALTER TABLE tester_src.typestest add (a13 nclob);
  59. ALTER TABLE tester_src.typestest add (a14 blob);
  60. ALTER TABLE tester_src.typestest add (a15 xmltype);
  61. ALTER TABLE tester_src.typestest add (a16 binary_double);
  62. ALTER TABLE tester_src.typestest add (a17 FLOAT(8));
  63. ALTER TABLE tester_src.typestest add (a18 binary_float);
  64. ALTER system archive LOG CURRENT;
  65. INSERT INTO tester_src.typestest
  66.      VALUES (
  67.                 '12345678901234567890123456789012',
  68.                 '12345678901234567890123456789012',
  69.                 '12345678901234567890123456789012',
  70.                 '12345678901234567890123456789012',
  71.                 '12345678901234567890123456789012',
  72.                 DBMS_RANDOM.VALUE(),
  73.                 DBMS_RANDOM.string('a', 4000),
  74.                 CURRENT_DATE,
  75.                 CURRENT_TIMESTAMP,
  76.                 CURRENT_TIMESTAMP,
  77.                 '1122334455667788990011223344556677889900112233445566778899001122',
  78.                 DBMS_RANDOM.string('a', 4000),
  79.                 DBMS_RANDOM.string('a', 4000),
  80.                 '112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900',
  81.                 XMLType(
  82.                     '<Warehouse whNo="100"><Building>Owned</Building></Warehouse>'),
  83.                 to_binary_double(1.00002),
  84.                 0.123,
  85.                 to_binary_float(1.2),
  86.                 '12345678901234567890123456789012',
  87.                 '12345678901234567890123456789012',
  88.                 '12345678901234567890123456789012',
  89.                 '12345678901234567890123456789012',
  90.                 '12345678901234567890123456789012',
  91.                 DBMS_RANDOM.VALUE(),
  92.                 CURRENT_DATE,
  93.                 CURRENT_TIMESTAMP,
  94.                 CURRENT_TIMESTAMP,
  95.                 '1122334455667788990011223344556677889900112233445566778899001122',
  96.                 DBMS_RANDOM.string('a', 4000),
  97.                 DBMS_RANDOM.string('a', 4000),
  98.                 '112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900',
  99.                 XMLType(
  100.                     '<Warehouse whNo="100"><Building>Owned</Building></Warehouse>'),
  101.                 to_binary_double(1.00002),
  102.                 0.123,
  103.                 to_binary_float(1.2));
  104. ALTER system archive LOG CURRENT;
  105. DROP TABLE tester_src.typestest;
  106. ALTER system archive LOG CURRENT;
Add Comment
Please, Sign In to add comment