daily pastebin goal
28%
SHARE
TWEET

Funkcije

a guest Jun 13th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE FUNCTION fName(@Parametar1 tip1,@Parametar2 tip2,...)
  2. RETURNS returnValType
  3. AS
  4. BEGIN
  5. Statements
  6. RETURN returnVal
  7. END
  8.  
  9. CREATE FUNCTION fName(@Parametar1 tip1, @Parametar2 tip2,...)
  10. RETURNS TABLE
  11. AS RETURN StatementThatReturnTable
  12.  
  13. SELECT * FROM dbo.fName(par1, par2...)
  14.  
  15. CREATE FUNCTION fName(@Pol VARCHAR(1))
  16. RETURNS @TABLE TABLE(Ime VARCHAR(20),Plata INT,Pol VARCHAR(1))
  17. AS
  18. BEGIN
  19. INSERT INTO @TABLE
  20. SELECT Ime,Plata,Pol
  21. FROM Zaposleni
  22. WHERE Pol = @Pol
  23. RETURN
  24. END
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top