sozdanie funktsiy v sql

DOC 5 pages 1.1 MB Free download

Page preview (5 pages)

Scroll down 👇
1 / 5
tashkentskiy universitet informatsionnix texnologiy imeni muxammada al-xorazmiy prakticheskaya rabota №14 tema: sozdanie funktsiy v sql distsiplina: baza dannix vipolnil : foziljonov mahmud potok : dbm205-2 tsel laboratornoy raboti: nauchitsya sozdavat sql funktsii. kratkie teoreticheskie svedeniya: v mysql funktsiya — eto xranimaya programma, v kotoruyu vi mojete peredavat parametri i vozvrashat znachenie. soxranennie podprogrammi (protseduri i funktsii) obespechivayutsya v mysql 5.0. soxranennaya protsedura predstavlyaet soboy nabor instruktsiy sql, kotorie mogut bit soxraneni na servere. nekotorie situatsii, gde soxranennie podprogrammi mogut bit osobenno polezni: · kogda mnogo prikladnix programm napisano na razlichnix yazikax ili rabotayut na razlichnix platformax, no doljni vipolnit te je samie operatsii s bazoy dannix. · kogda zashita pervostepenna. banki, naprimer, ispolzuyut soxranennie protseduri i funktsii dlya vsex obshix operatsiy. eto obespechivaet neprotivorechivuyu i bezopasnuyu sredu, i podprogrammi mogut garantirovat, chto kajdaya operatsiya pravilno registriruetsya. v takoy ustanovke prikladnie programmi (i ix polzovateli!) ne imeyut nikakogo dostupa k tablitsam …
2 / 5
out), gde parametri mogut ssilatsya na funktsiyu, no ne mogut bit perezapisani funktsiey. return_datatype — tip dannix vozvrashaemogo znacheniya funktsii. declaration_section — mesto v funktsii, gde vi ob'yavlyaete lokalnie peremennie. executable_section — mesto v funktsii, v kotoroy vi sozdaete kod funktsii. last login: tue nov 22 22:21:48 on ttys@e1 macbookair@macbook-air-—macbook ~ % /usr/local/mysql/bin/mysql -u root -p enter password: welcome to the mysql monitor. commands end with ; or \g. your mysql connection id is 9 server version: 8.0.30 mysql community server -— gpl copyright (c) 2000, 2022, oracle and/or its affiliates. oracle is a registered trademark of oracle corporation and/or its affiliates. other names may be trademarks of their respective owners. type 'help;' or '\h' for help. type '\c' to clear the current input statement. mysql> use hotel; reading table information for completion of table and column names you can turn off this feature to get a quicker startup with …
3 / 5
; -> return i; -> end; —> // error 1064 (42000): you have an error in your sql syntax; check the manual that corresponds to your mysql server version for the right syntax to use near 'doset i=i+start_val; end while label1; return i; mysql> create function funci(start_val int) returns int begin declare i int; set i=0; label1:while i select func1(200@);// focan naa + | func1(2000) | rr + | 4000 | rr + 1 row in set (0.01 sec) mysql> drop function func1; -> // query ok, ®@ rows affected (@.0@ sec) mysql> delimiter:: -> create procedure proci(out a int) -> begin -> select count(*) into a from administrator; —> end;:: -> call proci(@a);:: -—> select q@aj;:: -> delimiter :: -> delimiter:: => -> create procedure proci(out a int) —> -> begin => -> select count(*) into a from administrator; —> ok -> select count(*) into a from administrator; >; …
4 / 5
exist mysql> create trigger addattestatsforstudentupdate after update on students for each row -> fuck: begin -> if new.group = old.group then leave fuck; -> end// error 1064 (42000): you have an error in your sql syntax; check the manual that corresponds to your mysql server version for the right syntax to use near '' at line 4 mysql> delimiter // mysql> create procedure dorepeat(p int) -> begin —> set @x=0; —> repeat set @x=@x+1; -> until @x>p end repeat; -> end -> // query ok, ®@ rows affected (@.0@ sec) mysql> call dorepeat(10)// query ok, ®@ rows affected (@.0@ sec) mysql> select qx// 4+------ + | ex 4+------ + | 11] 4+------ + 1 row in set (@.0@ sec) mysql> delimiter // mysql> create prodecedure proc_in_exm(in n int) -> begin -> seelctxfrom administrator limit n; -> end// error 1064 (42000): you have an error in your sql syntax; check the …
5 / 5
sozdanie funktsiy v sql - Page 5

Want to read more?

Download all 5 pages for free via Telegram.

Download full file

About "sozdanie funktsiy v sql"

tashkentskiy universitet informatsionnix texnologiy imeni muxammada al-xorazmiy prakticheskaya rabota №14 tema: sozdanie funktsiy v sql distsiplina: baza dannix vipolnil : foziljonov mahmud potok : dbm205-2 tsel laboratornoy raboti: nauchitsya sozdavat sql funktsii. kratkie teoreticheskie svedeniya: v mysql funktsiya — eto xranimaya programma, v kotoruyu vi mojete peredavat parametri i vozvrashat znachenie. soxranennie podprogrammi (protseduri i funktsii) obespechivayutsya v mysql 5.0. soxranennaya protsedura predstavlyaet soboy nabor instruktsiy sql, kotorie mogut bit soxraneni na servere. nekotorie situatsii, gde soxranennie podprogrammi mogut bit osobenno polezni: · kogda mnogo prikladnix programm napisano na razlichnix yazikax ili rabotayut na razlichnix platformax, no doljni vipolnit ...

This file contains 5 pages in DOC format (1.1 MB). To download "sozdanie funktsiy v sql", click the Telegram button on the left.

Tags: sozdanie funktsiy v sql DOC 5 pages Free download Telegram