SQL - User input in query

前端 未结 3 1740
面向向阳花
面向向阳花 2021-01-06 00:13

I have this. \"Detail all films shown by the club between any two given dates, inputted by the user. For example a club member must be able to input a start date and an end

3条回答
  •  渐次进展
    2021-01-06 00:18

    Here's the code for a stored procedure:

    CREATE PROCEDURE SomeName(@UserStart DATETIME, @UserEnd DATETIME) 
    AS BEGIN
    
    SELECT somestuff
    FROM sometable
    WHERE somedate BETWEEN @UserStart AND @UserEnd
    
    END
    

提交回复
热议问题