Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Zadanie 1
- declare @a int
- select @a=COUNT(*)
- from Produkty
- if @a>500
- print 'wiecej niz 500'
- Zadanie 2
- use Magazyn;
- declare @z int
- declare @x int
- select @z=COUNT(Kolor) from Produkty
- where Kolor='Niebieski'
- select @x=count(Kolor) from Produkty
- where Kolor='Czarny'
- if @z>@x
- print 'niebieskich jest wiecej niz czarnych'
- else
- print 'czarnych jest wiecej niz niebieskich'
- Zadanie 3
- use Magazyn;
- declare @c int
- declare @i int
- set @i=0
- select @c=COUNT(*) from Produkty
- while @i<@c
- begin
- set @i=@i+1
- print 'Produkt'
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement