File: dml141.out

package info (click to toggle)
derby 10.14.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 79,056 kB
  • sloc: java: 691,961; sql: 42,686; xml: 20,512; sh: 3,373; sed: 96; makefile: 60
file content (48 lines) | stat: -rw-r--r-- 2,210 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
ij> AUTOCOMMIT OFF;
ij> -- MODULE  DML141  

-- SQL Test Suite, V6.0, Interactive SQL, dml141.sql
-- 59-byte ID
-- TEd Version #

-- AUTHORIZATION FLATER
   set schema FLATER;
0 rows inserted/updated/deleted
ij> --0   SELECT USER FROM HU.ECCO;
  VALUES USER;
1                                                                                                                               
--------------------------------------------------------------------------------------------------------------------------------
FLATER                                                                                                                          
ij> -- RERUN if USER value does not match preceding AUTHORIZATION comment
   ROLLBACK WORK;
ij> -- date_time print

-- NOTE Direct support for SQLCODE or SQLSTATE is not required
-- NOTE    in Interactive Direct SQL, as defined in FIPS 127-2.
-- NOTE   ********************* instead ***************************
-- NOTE If a statement raises an exception condition,
-- NOTE    then the system shall display a message indicating that
-- NOTE    the statement failed, giving a textual description
-- NOTE    of the failure.
-- NOTE If a statement raises a completion condition that is a
-- NOTE    "warning" or "no data", then the system shall display
-- NOTE    a message indicating that the statement completed,
-- NOTE    giving a textual description of the "warning" or "no data."

-- TEST:0514 SQLSTATE 23502: integrity constraint violation!

-- NOT NULL constraint violated
   INSERT INTO HU.STAFF VALUES (NULL, NULL, NULL, NULL);
ERROR 23502: Column 'EMPNUM'  cannot accept a NULL value.
ij> -- PASS:0514 If ERROR, integrity constraint violation, 0 rows inserted?

-- UNIQUE constraint violated
   INSERT INTO HU.STAFF VALUES ('E1', 'Agnetha', 12, 'Paris');
ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'STAFF_UNIQUE' defined on 'STAFF'.
ij> -- PASS:0514 If ERROR, integrity constraint violation, 0 rows inserted?

   ROLLBACK WORK;
ij> -- END TEST >>> 0514 <<< END TEST
-- *************************************************////END-OF-MODULE
;
ij>