SQL   SQL    

SQL

( .., ..)

  1. GRANT
  2. ,
  3. ALL PUBLIC
  4. WITH GRANT OPTION
  5. ?
  6. SELECT
  7. SQL

. 2, SQL , . , . , , , . , , . , . SQL: GRANT () REVOKE ().

, .

SQL . , ( ANSI) (ID) . , , , , , . SQL , ID , SQL USER, . ( ) .

, , . , ID . , ID . , , ID , ID .

SQL, ; ID .

SQL , , ( , ), ID . , SQL ID , , USER.

SQL . , . , . ANSI SQL, , .

SQL , ANSI, . , , , , , ANSI . , SQL, .

SQL , ANSI . , , . , , , , SQL, .

, . , , . , , ( ), . , .

, :

SELECT .

INSERT INSERT .

UPDATE UPDATE . .

DELETE DELETE .

REFERENCES , , . . ( 19 .)

, , , INDEX, , SYNONYM, , 23, ALTER, ALTER TABLE . SQL GRANT.

GRANT

, Diane Adrian . Diane , :

GRANT SELECT ON Customers TO Adrian;

Adrian . , ; , ( , , ).

SQL GRANT, , , , GRANT.

Adrian . SELECT : Diane ( , Diane Adrian SELECT ).

, . Adrian , Diane

GRANT INSERT ON Salespeople TO Diane;

Diane .

,

GRANT. , , . Stephen SELECT INSERT Adrian

GRANT SELECT, INSERT ON Orders TO Adrian;

Adrian Diane

GRANT SELECT, INSERT ON Orders TO Adrian, Diane;

, . ANSI , , , , , .

, UPDATE REFERENCES, . UPDATE :

GRANT UPDATE ON Salespeople TO Diane;

Diane . , Adrian Diane ,

GRANT UPDATE (comm) ON Salespeople TO Diane;

, , UPDATE , . , :

GRANT UPDATE (city, comm) ON Salespeople TO Diane;

REFERENCES . REFERENCES , . UPDATE, REFERENCES , . , Diane Stephen , , :

GRANT REFERENCES (cname, cnum) ON Customers TO Stephen;

Stephen cnum cname, . Stephen , . (cname, cnum) , (cnum, cname), , . , , , Diane (. 19).

, , (overlap).

UPDATE, . Adrian Diane :

GRANT REFERENCES ON Salespeople TO Diane;

, , .

ALL PUBLIC

SQL GRANT, : ALL PRIVILEGES ( ) ALL PUBLIC (). ALL GRANT, . , Diane Stephen :

GRANT ALL ON Customers TO Stephen;

( UPDATE REFERENCES .)

PUBLIC (catch-all), .

PUBLIC, . , SELECT , . , , , :

GRANT SELECT ON Orders TO PUBLIC;

, , . , SELECT, (, REFERENCES, ) . .

, , , , .

PUBLIC . , , , , , , , , SELECT .

WITH GRANT OPTION

, . , ( ) , , . SQL WITH GRANT OPTION.

Diane , Adrian SELECT , SELECT WITH GRANT OPTION:

GRANT SELECT ON Customers TO Adrian
WITH GRANT OPTION;

Adrian SELECT .

GRANT SELECT ON Diane.Customers TO Stephen;

GRANT SELECT ON Diane.Customers TO Stephen
WITH GRANT OPTION;

GRANT OPTION , , , , GRANT OPTION, . ; ( , , ID , ; ). GRANT OPTION .

ANSI CREATE TABLE, , DROP TABLE , GRANT , , . REVOKE, .

REVOKE GRANT, . INSERT Adrian ,

REVOKE INSERT ON Orders FROM Adrian;

, GRANT, :

REVOKE INSERT, DELETE ON Customers
FROM Adrian, Stephen;

, . ? ? , , ? , , :

, . , , , UPDATE REFERENCES, .

, , , , , , . GRANT.

?

, SELECT , . , INSERT, UPDATE DELETE, , . , , , . , REFERENCES . ANSI. ( ) . , , , .

SELECT

, Claire snum sname . ,

CREATE VIEW Clairesview
AS SELECT snum, sname
FROM Salespeople;

Claire SELECT , :

GRANT SELECT On Clairesview to Claire;

, INSERT , DELETE, . REFERENCES UPDATE, , , .

, , . , , , , . Adrian UPDATE , , :

CREATE VIEW Londoncust
AS SELECT *
FROM Customers
WHERE city = 'London'
WITH CHECK OPTION;

UPDATE Adrian:

GRANT UPDATE ON Londoncust TO Adrian;

UPDATE , , , city , London, . WITH CHECK OPTION Adrian city London.

, , . . , , , :

CREATE VIEW Datetotals
AS SELECT odate, COUNT (*), SUM (amt), AVG (amt)
FROM Orders
GROUP BY odate;

Diane SELECT Datetotals:

GRANT SELECT ON Datetotals TO Diane;

, 18, WITH CHECK OPTION . , , city , . CHECK city, , , , . , , city:

CREATE VIEW Curcities
AS SELECT *
FROM Salespeople
WHERE city IN ('London', 'Rome', 'San Jose', 'Berlin')
WITH CHECK OPTION;

, , , Curcities. , , , , , , . , , , .

, , , . , , . , . , , :

CREATE VIEW Othercities
AS SELECT *
FROM Salespeople
WHERE city NOT IN ('London', 'Rome', 'San Jose', 'Berlin')
WITH CHECK OPTION;

SELECT , , city . , .

, , , . ANSI, . ANSI ; , . , . :

ANSI , SQL , . .

, , , . , , , , ( ) ( ). , , ANSI ( ).

, , , - . , DBA (DataBase Administrator), , , .

:

- CONNECT (),
- RESOURCE (
),
- DBA (
).

, , CONNECT (. 23), . RESOURCE . DBA , . . , , , SYSADM SYS ( ), ; , DBA . SYSADM, . - . , , , DBA, , . GRANT , . DBA. , DBA Rodriguez :

GRANT RESOURCE TO Rodriguez;

, , Rodriguez? ID ? , DBA , CONNECT.

, IDENTIFIED BY, . , , ID . DBA , ,

GRANT CONNECT TO Thelonius IDENTIFIED BY Redwagon;

Thelonius, , Redwagon, .

Thelonious , DBA Redwagon. , . , , . , REVOKE CONNECT, "" . , .

CONNECT , . , DBA . ( ), RESOURCE. .

CONNECT , , , , . , , CONNECT. , , , INSERT, . RESOURSE; CONNECT, .

, . , .

SQL, , SQL. , , , DBA . , .

SQL , SQL . GRANT : . WITH GRANT OPTION , .

, , , . , , SQL, .

23 SQL, , , , , , .

SQL

(. A .)

SQL

SQL, , , , , . , , .

, , , , SQL , . , SQL ( ANSI).

. , , , ( ) , , , . ( .)

Adrian Clients, Diane.Customers, CREATE SYNONYM :

CREATE SYNONYM clients FOR Diane.Customers;

, Adrian Clients , Diane.Customers. Clients , Adrian.

() . , , SQL . , , , - ( SQL). , , , , , . , , CHECK OPTION CHECK ( 22 ). , , . , Adrian Customers, Diane.Customers:

CREATE SYNONYM Customers FOR Diane.Customers;

SQL, : Diane.Customers Adrian.Customers. , Customers, SQL .

, , , . , , . , . , Customers,

CREATE PUBLIC SYNONYM Customers FOR Customers;

, , . , , DBA. , , , . , . PUBLIC, .

DROP SYNONYM. , , , DBA. , , Clients, Customers, Adrian

DROP SYNONYM Clients;

, , .

?

, . , , " ", , , SQL, . , , , , , , , .

, (, , ) . , SQL , , .

SQL , , .

, , ; - , . , , SQL.

, ( DBS Data Base Spaces), SQL .

DBS CREATE DBSPACE ( DBS), ACQUIRE DBSPACE ( DBS) CREATE TABLESPACE ( ), . DBS , DBS. , , DBS. DBS Sampletables, :

CREATE DBSPACE Sampletables
(pctindex 10,
pctfree 25);

pctindex , DBS , . Pctfree DBS, , (ALTER TABLE , ; , ). , , . , DBS, . DBS , .

DBS , . , , Diane Sampletables :

GRANT RESOURCE ON Sampletables TO Diane;

. DBS, , .

, DBS, , .

DBS, , . , , , , , , DBS.

, , , . , DBS, , . , DBS.

?

, , , , . , , , , .

SQL, DML DROP TABLE, . , , , . , , .

, SQL. , , COMMIT WORK ROLLBACK WORK. COMMIT , ROLLBACK . COMMIT ROLLBACK. . , , COMMIT ROLLBACK

COMMIT WORK;

-

ROLLBACK WORK;

, , AUTOCOMMIT. , . , , "" . , , :

SET AUTOCOMMIT ON;

:

SET AUTOCOMMIT OFF;

AUTOCOMMIT, .

, , . , , . ; , .

, , , , . , , , . , , Motika . , , - . ( , , ANSI, , , . .)

, snum NULL, , Peel. :

UPDATE Orders
SET snum = NULL
WHERE snum = 1004;

UPDATE Cudomers
SET snum = 1001
WHERE snum = 1004;

DELETE FROM Salespeople
WHERE snum = 1004;

Motika (, , , ), , , , .

, , . COMMIT, COMMIT ROLLBACK.

SQL

SQL , . . , :

UPDATE Salespeople
SET comm = comm * 2
WHERE sname LIKE 'R%';

, Diane :

SELECT city, AVG (comm)
FROM Salespeople
GROUP BY city;

(AVG) Diane , ? , , , , (comm), . , , . .

. , , Diane . Diane , , , , .

, . :

* . , , , . , , .

: "", "", , , "" , "".

* , . , , Diane .

* . , Diane , . , , . , , Diane , , . , .

* . , . , .

, , . , SQL . ANSI , ( COMMIT ROLLBACK).

, . , , . SQL , . , DBA, .

SQL, SQL.

, SQL , . , . ( NOWAIT, , , - ).

. , , . , , CREATE DBSPACE ALTER DBSPACE, - DBS.

, , , , . , .

, DB2 IBM. IBM (, , ), . , , .

:

.

( S-) . , .

( X-) , . , . .

. , .

? , , .

DB2, , , , , . , SQL, , . , , .

, , .

, , , . , , , , .

, , , , . , , , .

, , .

, , . , , (.. ).

, , , , , , . . , , , .

DB2 .

; . , . , , .

, . , , , , . , , , , .

. , .

, 1024 . , , . , , .

. SQL , . , SQL , , , .

, DBS. , , , .

, , .

, :

, , () , , . , .

DBS DBS , . , ( , ) DBS.

COMMIT ROLLBACK , , COMMIT ROLLBACK, , .

, . , .

SQL

(. A .)

24

SQL

SQL . , , . , , , . , .

SQL , : , , , , , , . , , , , , . , , , , , . , ANSI, SQL SQL , . , , . " " , SQL.

, , , .

SQL : . , , , ; , , . , , , SYSTEM. ; .

, . , , . , - , . , . , .

, , . , , , , SYSTEM DBA. , .

, :


SYSTEMCATALOG ( )
SYSTEMCOLUMNS

SYSTEMTABLES
SYSTEMCATALOG
SYSTEMINDEXES

SYSTEMUSERAUTH

SYSTEMTABAUTH

SYSTEMCOLAUTH

SYSTEMSYNONS

, DBA Stephen SYSTEMCATALOG ,

GRANT SELECT ON SYSTEMCATALOG TO Stephen;

Stephen ( DBA, Chris, , Adrian, Londoncust).

SELECT tname, owner, numcolumns, type, CO
FROM SYSTEMCATALOG;

=============== SQL Execution Log ===============
| SELECT tname, owner, numcolumns, type, CO |
| FROM SYSTEMCATALOG; |
| ================================================ |
| tname owner numcolumns type CO |
| ------------- ------- ---------- ---- --- |
| SYSTEMCATALOG SYSTEM 4 B |
| Salespeople Chris 4 B |
| Customers Chris 5 B |
| Londoncust Adrian 5 V Y
|
| Orders Chris 5 B |
==================================================

24.1. SYSTEMCATALOG

, . ; ; , ; , B ( ) V ( ). (NULL) , V; , .

, SYSTEMCATALOG ( ) . . SYSTEMCATALOG.

SYSTEMCATALOG , . , SYSTEMTABLES.

SYSTEMCATALOG , ; , , SYSTEMCATALOG, SYSTEMTABLES.

, SYSTEM. , , :

CREATE VIEW Datatables
AS SELECT *
FROM SYSTEMCATALOG
WHERE owner <> 'SYSTEM';

()

, . , , . USER, SQL ID , , .

, :

CREATE VIEW Owntables
AS SELECT *
FROM SYSTEMCATALOG
WHERE Owner = USER;

:

GRANT SELECT ON Owntables TO PUBLIC;

(SELECT) SYSTEMCATALOG, .

SYSTEMCOLUMNS. SYSTEMCOLUMNS . , SYSTEMCOLUMNS, ( , ):

tname cname datatype cnumber tabowner
Salespeople snum integer 1 Diane
Salespeople sname char 2 Diane
Salespeople city char 3 Diane
Salespeople comm decimal 4 Diane
Customers cnum integer 1 Claire
Customers cname char 2 Claire
Customers city char 3 Claire
Customers rating integer 4 Claire
Customers snum integer 5 Claire
Orders onum integer 1 Diane
Orders odate date 2 Diane
Orders amt decimal 3 Diane
Orders cnum integer 4 Diane
Orders snum integer 5 Diane

, . , , , , .

, : tname ( ), tabowner ( ), cname ( ), . datatype ( ) . cnumber ( ) . , , , .

, SYSTFMCATALOG, :

tname owner numcolumns type CO
SYSTEMCOLUMNS System 8 B

SQL , , .

, , , SYSTEMCOLUMNS :

CREATE VIEW Owncolumns
AS SELECT *
FROM SYSTEMCOLUMNS
WHERE tabowner = USER;

GRANT SELECT ON Owncolumns TO PUBLIC;

SQL () SYSTEMCATALOG SYSTEMCOLUMNS, , . , .

COMMENT ON , . TABLE, SYSTEMCATALOG, COLUMN, SYSTEMCOLUMNS.

:

COMMENT ON TABLE Chris.Orders
IS 'Current Customer Orders';

SYSTEMCATALOG. , 254 .

, , tname=Orders, owner=Chris. SYSTEMCATALOG:

SELECT tname, remarks
FROM SYSTEMCATALOG
WHERE tname = 'Orders' AND owner = 'Chris';

24.2.

=============== SQL Execution Log ===============
| SELECT tname, remarks |
| FROM SYSTEMCATALOG |
| WHERE tname = 'Orders' |
| AND owner = 'Chris' |
| ; |
| ================================================ |
| tname remarks |
| ------------- ----------------------- |
| Orders Current Customers Orders |
=
=================================================

24.2
. SYSTEMCATALOG

SYSTEMCOLUMNS . , :

COMMENT ON COLUMN Orders.onum
IS 'Order #';

SYSTEMCOLUMNS:

SELECT cnumber, datatype, cname, remarks
FROM SYSTEMCOLUMNS
WHERE tname = 'Orders' AND tabowner = 'Chris' AND cname = onum;

24.3.

, COMMENT ON . . , , :

COMMENT ON COLUMN Orders.onum
IS ";

.

=============== SQL Execution Log ===============
| SELECT cnumber, datatype, cname, remarks |
| FROM SYSTEMCOLUMNS |
| WHERE tname = 'Orders' |
| AND tabowner = 'Chris' |
| AND cname = 'onum' |
| ; |
| ================================================ |
| cnumber datatype cname remarks |
| ---------- --------- ------ ------------ |
|
1 integer onum Orders # |
==================================================

24.3: SYSTEMCOLUMNS

, :

SYSTEMINDEXES

SYSTEMINDEXES :

iname ( )

iowner

tname

cnumber

tabowner

numcolumns

cposition

isunique (Y N)

, , snum :

SELECT iname, iowner, tname, cnumber, isunique
FROM SYSTEMINDEXES
WHERE iname = 'salesperson';

24.4.

=============== SQL Execution Log ================
| SELECT iname, iowner, tname, cnumber, isunique |
| FROM SYSTEMINDEXES |
| WHERE iname = 'salespeople' |
| ; |
| ================================================= |
| iname iowner tname cnumber isunique |
| ----------- ------ ---------- ------- -------- |
| salesperson Stephan Customers 5 N |
====================================
===============

24.4: SYSTEMINDEXES

SYSTEMUSERAUTH

SYSTEMUSERAUTH , :

username (ID)

password

resource RESOURCE

dba DBA

, 22, CONNECT (), RESOURCE () DBA.

CONNECT , . resource dba Y (, ) No (, ).

(password) , . , .

, RESOURCE, DBA, :

SELECT username, dba
FROM SYSTEMUSERAUTH
WHERE resource = 'Y';

24.5.

SYSTEMTABAUTH ,

SYSTEMTABAUTH :

COLUMN

username ,

grantor ,

tname ,

owner tname

selauth SELECT

insauth INSERT

delauth DELETE

( auth) Y, N, G. G , . , N ( , - ).

=============== SQL Execution Log ================
| SELECT username, dba |
| FROM SYSTEMUSERAUTH |
| WHERE resource = 'Y' |
| ; |
| ================================================= |
| username dba |
| ----------- ------
|
| Diane N |
| Adrian Y |
===================================================

24.5
. RESOURCE

. tname, - ( , ), (), . ( ), .

UPDATE REFERENCES , , . , , . .

SELECT, INSERT DELETE, Adrian , ( 24.6):

SELECT username, selauth, insauth, delauth
FROM SYSTEMTABAUTH
WHERE grantor = 'Adrian' AND tname = 'Customers';

=============== SQL Execution Log ================
| SELECT username, selauth, insauth, delauth |
| FROM SYSTEMTABAUTH |
| WHERE grantor = 'Adrian' |
| AND tname = 'Customers' |
| ; |
| ================================================= |
| username selauth insauth delauth |
| ----------- ------- -------- -------- |
| Claire G Y N |
| Norman Y Y Y |
==========================================
=========

24.6
. Adrian

, Adrian Claire INSERT SELECT , . Norman SELECT, INSERT DELETE, . Claire DELETE - , .

SYSTEMCOLAUTH

username

grantor

tname

cname

owner tname

updauth UPDATE

refauth REFERENCES

updauth refauth Y, N, G; N . , . SYSTEMTABAUTH cname, . .

SYSTEMTABAUTH .

, REFERENCES, ( 24.7)

SELECT owner, tname, cname
FROM SYSTEMCOLAUTH
WHERE refauth IN ('Y', 'G') AND username = USER
ORDER BY 1, 2;

, , , , , (.. ).

=============== SQL Execution Log ================
| SELECT OWNER, TNAME, CNAME |
| FROM SYSTEMCOLAUTH |
| WHERE refaulth IN ('Y' , 'G') |
| AND username = USER |
| ORDER BY 1, 2 |
| ; |
| ================================================= |
| owner tname cname |
| ----------- ----------- ------- |
| Diane Customers cnum |
| Diane Salespeople sname |
| Diane Salespeople sname |
| Gillan Cu
stomers cnum |
===================================================

24.7. INSERT

SYSTEMSYNONS

SYSTEMSYNONS :

synonym

synowner , ( PUBLIC ())

tname

tabowner

, Adrian Clients , Diane, Customers . ( 24.8):

SELECT *
FROM SYSTEMSYNONS
WHERE tname = 'Customers'

=============== SQL Execution Log ================
| SELECT * |
| FROM SYSTEMSYNONS |
| WHERE tname = 'Customers' |
| ; |
| ================================================= |
| synonym synowner tname tabowner |
| ----------- ----------- ---------- ---------- |
| Clients Adrian Customers
Diane |
| Customers PUBLIC Customers Diane |
===================================================

24.8:

, . , , . , ( 24.9):

SELECT a.tname, a.cname, iname, cposition
FROM SYSTEMCOLUMNS a, SYSTEMINDEXES b
WHERE a.tabowner = b.tabowner AND a.tname = b.tname AND
a.cnumber = b.cnumber
ORDER BY 3 DESC, 2;

, . salesno snum; - ( ) iname. , custsale, , . snum cnum , snum , cposition.

=============== SQL Execution Log ================
| SELECT a.tname, a.cname, iname, cposition |
| FROM SYSTEMCOLUMNS a, SYSTEMINDEXES b |
| WHERE a.tabowner = b.tabowner |
| AND a.tname = b.tname |
| AND a.cnumber = b.cnumber |
| ORDER BY 3 DESC, 2; |
| ================================================= |
| tname cname iname cposition |
| ----------- ------- -------- ------------ |
| Salespeople sname salesno 1 |
| Customers cnum custsale 2 |
|
Customers snum custsale 1 |
===================================================

24.9.

. :

SELECT *
FROM SYSTEMCOLUMNS
WHERE tname IN (SELECT tname
FROM SYSTEMCATALOG);

, , . , , , SYSTEMTABCOLS, SYSTEMTABLES.

, SQL , . . , ( ) SYSTEMCATALOG SYSTEMCOLUMNS. , .

, , SQL . , SQL , , , , SQL, .

SQL

(. A .)

25

SQL ( SQL)

, SQL . SQL , . , SQL , ( ). , , , , , , ANSI .

SQL

SQL , , SQL , , . , , . , SQL , , , ( ).

SQL?

, SQL, , , , , , .

, SQL , SQL .

if ... then (" ... "), for ... do (" ... ") while ... repeat (" ... ") , , , , . , SQL , , , - .

, , . , , , , , , , , . , . , (, ).

SQL , , , SQL , , .

SQL

SQL , EXEC SQL (EXECute SQL). , SQL .

, ANSI SQL . , , , SQL, . SQL, , SQL, , ANSI . ANSI ( ), SQL : , , , /1. C , . SQL , , , .

, ( ), SQL , . , .

ANSI, SQL. . , SQL. , , , ( - ). , SQL , . , . , SQL, . SQL , .

, SQL, ID . ID , , , SQL, . -, SQL , , . , , CONNECT .

SQL

, SQL . , . ANSI SQL /1, , , ; B. .

, , DATE, ANSI, , ANSI . , , SQL. SQL , . (SQL, , SQL, .)

, , . :

SQL , , , .

, , : id_num, salesperson, loc comm. , . SQL :

EXEC SQL INSERT INTO Salespeople
VALUES (:id_num, :salesperson, :loc, :comm)

. , comm , , .

, . , SQL , .

PL/1 , END-EXEC, .

, , ( ) , SQL . SQL .

, , , , , :

while not end-ot-file (input) do
begin
readln(id_num, salesperson, loc, comm);
EXEC SOL INSERT INTO Salespeople
VALUES (:id_num, :salesperson, :loc, :comm);
end;

, , , , , , , . , ( , readln ). .

, , , .12:

while not end-ot-file (input) do
begin
readln (id_num, salesperson, loc, comm);
if comm >= .12 then EXEC SQL INSERT INTO Salespeople
VALUES (:id_num, :salesperson, :loc, :comm);
end;

, comm >= .12, . , , .

, SQL, SQL DECLARE SECTION ( ), . , - , , . SQL BEGIN DECLARE SECTION ( ) END DECLARE SECTION ( ), , EXEC SQL ().

, , :

EXEC SQL BEGIN DECLARE SECTION;
Var
id-num: integer;
Salesperson: packed array (1..10) ot char;
loc: packed array (1..10) ot char;
comm: real;
EXEC SQL END DECLARE SECTION;

, Var , ( ) , , (, loc loc[3]).

, , SQL.

, SQL, SQL, . SELECT, INTO. Peel .

EXEC SQL SELECT snum, sname, city, comm
INTO :id_num, :salesperson, :loc, :comm
FROM Salespeople
WHERE snum = 1001;

INTO. , , INTO, , , .

INTO, . INTO . . , . . , SELECT INTO :

EXEC SQL SELECT DISTINCT snum
INTO :salesnum
FROM Customers
WHERE snum = (SELECT snum
FROM Salespeople
WHERE sname = 'Motika');

, Salespeople.sname Salespeople.snum , , Customers.snum , Salespeople.snum, , .

, , , , , , , . ! , , , , , . , , , SELECT INTO .

, , , .

SQL , -, , . , . , . , . , , ? , , .

, , . SQL , , , .

, . , . , , . DECLARE CURSOR, :

EXEC SQL DECLARE CURSOR Londonsales FOR
SELECT *
FROM Salespeople
WHERE city = 'London';

; . , , , , . , , : , ... ... . , ORDER BY - , .

, , :

EXEC SQL OPEN CURSOR Londonsales;

, , DECLARE FETCH. , FETCH, , .

EXEC SQL FETCH Londonsales INTO :id_num, :salesperson, :loc, :comm;

, . FETCH . , FETCH , , , , , , , .

, , , , ,

Look_at_more:=True;
EXEC SQL OPEN CURSOR Londonsales;
while Look_at_more do
begin
EXEC SQL FETCH Londonsales
INTO :id_num, :Salesperson, :loc, :comm;
writeln (id_num, Salesperson, loc, comm);
writeln ('Do you want to see more data? (Y/N)');
readln (response);
it response = 'N' then Look_at_more:=False
end;
EXEC SQL CLOSE CURSOR Londonsales;

, := " ", = "". writeln , .

, Look_at_more "", , . , . , . N (), , .

Look_at_more response boolean char , SQL, SQL.

, -SQL . , CLOSE CURSOR OPEN CURSOR. , , , OPEN CURSOR, .

, , .

, SQL , . , , .

, . FETCH , , INTO. , , , , , N.

  SQL   SQL    

, --, Class-responsibility-collaboration - -- - - , :
- - - , ;
- - - , .




 10.11.2021 - 12:37: - Personalias -> WHO IS WHO - - _.
10.11.2021 - 12:36: - Conscience -> . ? - _.
10.11.2021 - 12:36: , , - Upbringing, Inlightening, Education -> ... - _.
10.11.2021 - 12:35: - Ecology -> - _.
10.11.2021 - 12:34: , - War, Politics and Science -> - _.
10.11.2021 - 12:34: , - War, Politics and Science -> . - _.
10.11.2021 - 12:34: , , - Upbringing, Inlightening, Education -> , - _.
10.11.2021 - 09:18: - New Technologies -> , 5G- - _.
10.11.2021 - 09:18: - Ecology -> - _.
10.11.2021 - 09:16: - Ecology -> - _.
10.11.2021 - 09:15: , , - Upbringing, Inlightening, Education -> - _.
10.11.2021 - 09:13: , , - Upbringing, Inlightening, Education -> - _.
Bourabai Research -  XXI Bourabai Research Institution