1.

How Would You Write A Simple Stored Procedure In Tsql Which Takes A Movie_id And Returns All The Directors Associated With It?

Answer»

SET QUOTED_IDENTIFIER ON 
GO 
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].getDirector (
@movie_id INT
)
SELECT NAME FROM directors WHERE movie_id = @movie_id
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON 
GO 
SET ANSI_NULLS ON
GO
CREATE procedure [dbo].getDirector (
@movie_id INT
)
SELECT name FROM directors WHERE movie_id = @movie_id
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO



Discussion

No Comment Found