0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ストアド 関数 テーブルを返す

Last updated at Posted at 2016-07-06

テーブルを返す関数

CREATE  FUNCTION [dbo].[test_function]
(
     @param1    VARCHAR(MAX) ='' 
    ,@param2    VARCHAR(MAX) ='' 
)  
RETURNS @newTable TABLE
(
     no   INT
    ,name VARCHAR(20)
)
BEGIN 
    INSERT INTO @newTable VALUES( 1, '太郎' ) ;
    INSERT INTO @newTable VALUES( 2, '次郎' ) ;
    INSERT INTO @newTable VALUES( 3, '三郎' ) ;
   
    RETURN
END
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?