Oracle Database 21c Enterprise Edition Release 21
Oracle Database 21c Enterprise Edition Release 21
0 - Production
Version 21.3.0.0.0
User created.
Grant succeeded.
ERROR at line 1:
ERROR at line 1:
Grant succeeded.
SQL>
Version 21.3.0.0.0
Enter password:
Connected to:
Version 21.3.0.0.0
creating table
2 Street VARCHAR2(100),
3 City VARCHAR2(50),
4 State VARCHAR2(50),
5 ZipCode VARCHAR2(10)
6 );
7 /
Type created.
4 ShippingAddress AddressType1,
5 BillingAddress AddressType1
6 );
Table created.
4 ContactName VARCHAR2(50),
5 ContactEmail VARCHAR2(100),
6 Address AddressType1,
NOT NULL)
8 );
Table created.
4 Quantity NUMBER,
5 Price NUMBER(10,2),
6 SupplierID NUMBER,
9 );
Table created.
3 CustomerID NUMBER,
4 OrderDate DATE,
3 CustomerID NUMBER,
4 OrderDate DATE,
6 );
Table created.
3 OrderID NUMBER,
4 ProductID NUMBER,
5 Quantity NUMBER,
9 );
Table created.
3 ProductID NUMBER,
4 Quantity NUMBER,
7 );
Table created.
SQL>
creating view
SQL> CREATE VIEW Customers3View AS
View created.
2 3 CR
View created.
View created.
View created.
View created.
SQL>
stored procedure
SQL> CREATE OR REPLACE PROCEDURE GetCustomers3
2 AS
3 v_CustomerInfo SYS_REFCURSOR;
4 BEGIN
7 END;
8 /
Procedure created.
2 AS
3 BEGIN
5 BEGIN
8 /
2 AS
3 v_SupplierInfo SYS_REFCURSOR;
4 BEGIN
7 END;
8 /
Procedure created.
2 AS
3 v_ProductInfo SYS_REFCURSOR;
4 BEGIN
7 END;
8 /
Procedure created.
2 AS
3 v_OrderInfo SYS_REFCURSOR;
4 BEGIN
7 END;
8 /
Procedure created.
2 AS
3 v_OrderItemInfo SYS_REFCURSOR;
4 BEGIN
7 END;
8 /
Procedure created.
2 AS
3 v_InventoryItemInfo SYS_REFCURSOR;
4 BEGIN
7 END;
8 /
2 AS
3 v_InventoryItemInfo SYS_REFCURSOR;
4 BEGIN
7 END;
8 /
2 AS
3 v_InventoryInfo SYS_REFCURSOR;
4 BEGIN
7 END;
8 /
Procedure created.
SQL>
4 BEGIN
5 END;
6 /
ERROR at line 1:
ERROR:
ERROR:
SQL> SELECT *
2 FROM all_tab_columns
no rows selected
ERROR at line 2:
ERROR at line 2:
ERROR at line 1:
2 VALUES (
3 1,
4 'Supplier1',
5 'John Smith',
6 'john.smith@example.com',
8 );
1 row created.
SUPPLIERID SUPPLIERNAME
---------- --------------------------------------------------
CONTACTNAME
--------------------------------------------------
CONTACTEMAIL
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
1 Supplier1
John Smith
john.smith@example.com
2 VALUES (
3 2,
4 'Supplier2',
5 'Hana Abebe',
6 'hana.abebe@gmail.com',
1 row created.
2 VALUES (
3 3,
4 'Supplier3',
5 'Abel Getahun',
6 'abel.gech@gmail.com',
1 row created.
2 VALUES (
3 1,
4 'Product1',
5 10,
6 99.99,
7 1
8 );
1 row created.
2 'Product2',
3 11,
4 90.99,
5 2
6 );
'Product2',
ERROR at line 2:
2 VALUES(
3 2,
4 'product2',
5 11,
6 1000.00,
7 2
8 );
1 row created.
2 VALUES(
3 3,
4 'product3',
5 12,
6 8888.93,
7 3
8 );
1 row created.
2 VALUES (
3 1,
4 'John Doe',
7 );
ERROR at line 1:
ORA-04098: trigger 'C##HIRU.TRG_CUSTOMERS3' is invalid and failed re-validation
2 VALUES (
3 1,
4 'John Doe',
7 );
ERROR at line 1:
2 SELECT
3 p.ProductID,
4 p.ProductName,
5 p.Quantity,
6 p.Price,
7 s.SupplierID,
8 s.SupplierName,
9 s.ContactName,
10 s.ContactEmail,
11 s.Address
12 FROM
13 Products3 p
View created.
CONTACTNAME
--------------------------------------------------
CONTACTEMAIL
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
1 Product1
10
99.99 1 Supplier1
John Smith
CONTACTNAME
--------------------------------------------------
CONTACTEMAIL
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
john.smith@example.com
CONTACTNAME
--------------------------------------------------
CONTACTEMAIL
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
2 product2
11
1000 2 Supplier2
Hana Abebe
CONTACTNAME
--------------------------------------------------
CONTACTEMAIL
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
hana.abebe@gmail.com
CONTACTNAME
--------------------------------------------------
CONTACTEMAIL
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
3 product3
12
8888.93 3 Supplier3
Abel Getahun
CONTACTNAME
--------------------------------------------------
CONTACTEMAIL
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
abel.gech@gmail.com