ORACLE transaction is a logical unit of work which contains one or more than one SQL commands. It is an atomic unit which means that all SQL commands in the transaction can be either committed (Done) or rolled back (Undone).
Accounts:
Ac_Ttile Ac_Number Ac_Type Balance
You are required to write PL/SQL code for an ORACLE transaction on Accounts table (given above) containing the following SQL commands.
-- Table: public.Account
-- DROP TABLE public."Account";
CREATE TABLE public."Account"
(
"Ac_Ttile" "char"[] NOT NULL,
"Ac_Type" "char"[] NOT NULL,
"AccountNumber" integer[] NOT NULL,
"Balance" "char" NOT NULL,
CONSTRAINT "Account_pkey" PRIMARY KEY ("AccountNumber")
)
TABLESPACE pg_default;
ALTER TABLE public."Account"
OWNER to postgres;
INSERT INTO public."Account"(
"Ac_Ttile", "Ac_Type", "AccountNumber", "Balance")
VALUES ("WaqarHassan","Current", 2025660,"1000");
DELETE FROM public."Account"
WHERE AccountNumber=2025660;
Comments
Leave a comment