Book of tasks on programming. Old version

 

 by Aliaksandr N. Prykhodzka

 

обзоры, in, case, computer, запрос, форматирование, forward, абстрактный, shr, variable, система счисления, система счисления, void, floppy, образование
 

for valuable work you must have JavaScript (allow active content)

SQL. S.5. Nest of tasks. Operator Update

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

S.5.1     Answer

Which from these operators modify table Tabl1 in such way that values of rows AA and BB are equal for all records.


(1)
Update Tabl1 set BB=BB+1

(2)
Update Tabl1 set AA=AA+1 where AA>10

(3)
Update Tabl1 set AA=BB where AA=BB

(4)
Update Tabl1 set AA=AA+1

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

S.5.2     Answer

Which from these operators modify table Tabl1 in such way that values of rows AA and BB are equal for all odd records (records with odd value of row AA):


(1)
Update Tabl1 set AA=BB

(2)
Update Tabl1, Tabl2 set BB=BB-1
where (AA=CC) or (AA=CC+50)

(3)
Update Tabl1 set BB=BB-1
where (AA=BB) or (AA+50=BB)

(4)
Update Tabl1, Tabl2 set BB=BB-1
where AA>CC

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

S.5.3     Answer

Which from these operators set values of all records of table Tabl2 to 0:


(1)
Update Tabl2 set CC=CC

(2)
Update Tabl2 Set CC=0 where CC>10

(3)
Update Tabl2 set CC=CC-CC Where CC>0

(4)
Update Tabl2 set CC=CC-1 where CC>10

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

S.5.4     Answer

Which from these operators choose values 1,2,3,4,.....,99 of row AA in table Tabl1 to values 1,3,5,7,....,199:


(1)
Update Tabl1, Tabl2 set AA=AA*2-1

(2)
Update Tabl1, Tabl4 set AA=BB where (AA=FF) or (AA=FF+50)

(3)
Update Tabl1, Tabl3, Tabl4
set AA=CC+FF where (AA=CC) and (BB=FF)

(4)
Update Tabl1 set AA=AA+BB

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

S.5.5     Answer

Which from these operators choose values 1,2,3,4,.....,99 of row AA in table Tabl1 to values 1,3,5,7,....,199:


(1)
Update Tabl1 set AA=AA*2

(2)
Update Tabl1 set AA=AA+BB-2

(3)
Update Tabl1 set AA=BB-1

(4)
Update Tabl1 set AA=BB*2-2

 

©   Aliaksandr Prykhodzka    1993 - 2007