Friday, April 6, 2012

alter a view in SQL (this includes a JOIN)

USE [MyDatabase]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[whatever]
AS
SELECT foo.bar, baz.qux
FROM dbo.my_first_table AS foo
INNER JOIN dbo.my_other_table AS baz
ON foo.id = baz.id_in_my_first_table
GO

No comments:

Post a Comment