blob: a4c6b10ea9f01c74cba9ab5fdefa6a9b5f7a2ed9 [file]
ij> AUTOCOMMIT OFF;
ij> -- MODULE DML170
-- SQL Test Suite, V6.0, Interactive SQL, dml170.sql
-- 59-byte ID
-- TEd Version #
-- AUTHORIZATION FLATER
set schema FLATER;
0 rows inserted/updated/deleted
ij> --O SELECT USER FROM HU.ECCO;
VALUES USER;
1
--------------------------------------------------------------------------------------------------------------------------------
FLATER
ij> -- RERUN if USER value does not match preceding AUTHORIZATION comment
--O ROLLBACK WORK;
-- date_time print
-- TEST:0880 Long constraint names, cursor names!
CREATE TABLE T0880 (
C1 INT NOT NULL, C2 INT NOT NULL,
CONSTRAINT
"It was the best of"
PRIMARY KEY (C1, C2));
0 rows inserted/updated/deleted
ij> -- PASS:0880 If table created successfully?
COMMIT WORK;
ij> INSERT INTO T0880 VALUES (0, 1);
1 row inserted/updated/deleted
ij> -- PASS:0880 If 1 row inserted successfully?
INSERT INTO T0880 VALUES (1, 2);
1 row inserted/updated/deleted
ij> -- PASS:0880 If 1 row inserted successfully?
INSERT INTO T0880 VALUES (1, 2);
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 'It was the best of' defined on 'T0880'.
ij> -- PASS:0880 If ERROR - integrity constraint violation?
SELECT C1 FROM T0880 ORDER BY C1;
C1
-----------
0
1
ij> -- PASS:0880 If 2 rows are returned in the following order?
-- c1
-- ==
-- PASS:0880 If 0 ?
-- PASS:0880 If 1 ?
COMMIT WORK;
ij> ALTER TABLE T0880
DROP CONSTRAINT
"It was the best of"
--O CASCADE;
;
0 rows inserted/updated/deleted
ij> -- PASS:0880 If table altered successfully?
COMMIT WORK;
ij> INSERT INTO T0880 VALUES (0, 1);
1 row inserted/updated/deleted
ij> -- PASS:0880 If 1 row inserted successfully?
SELECT COUNT (*) FROM T0880;
1
-----------
3
ij> -- PASS:0880 If COUNT = 3?
COMMIT WORK;
ij> --O DROP TABLE T0880 CASCADE;
DROP TABLE T0880 ;
0 rows inserted/updated/deleted
ij> -- PASS:0880 If table dropped successfully?
COMMIT WORK;
ij> -- END TEST >>> 0880 <<< END TEST
-- *********************************************
-- TEST:0881 Long character set names, domain names!
--O CREATE CHARACTER SET
--O "Little boxes on the hillside, Little boxes made of ticky-tacky"
--O GET SQL_TEXT;
-- PASS:0881 If character set created successfully?
--O COMMIT WORK;
--O CREATE DOMAIN
--O "Little boxes on the hillside, Little boxes all the same."
--O CHAR (4) CHARACTER SET
--O "Little boxes on the hillside, Little boxes made of ticky-tacky";
-- PASS:0881 If domain created successfully?
--O COMMIT WORK;
--O CREATE TABLE T0881 ( C1
--O "Little boxes on the hillside, Little boxes all the same.");
-- PASS:0881 If table created successfully?
--O COMMIT WORK;
--O INSERT INTO T0881 VALUES ('ABCD');
-- PASS:0881 If insert completed successfully?
--O SELECT COUNT(*) FROM T0881
--O WHERE C1 = 'ABCD';
-- PASS:0881 If COUNT = 1?
--O COMMIT WORK;
--O DROP TABLE T0881 CASCADE;
-- PASS:0881 if table dropped successfully?
--O COMMIT WORK;
--O DROP DOMAIN
--O "Little boxes on the hillside, Little boxes all the same."
--O CASCADE;
-- PASS:0881 If domain dropped successfully?
--O COMMIT WORK;
--O DROP CHARACTER SET
--O "Little boxes on the hillside, Little boxes made of ticky-tacky";
-- PASS:0881 If character set dropped successfully?
--O COMMIT WORK;
-- END TEST >>> 0881 <<< END TEST
-- *********************************************
-- *************************************************////END-OF-MODULE
;
ij>