---------------------------------------------------------------------
-- SQL Server 2005ストアドプロシージャプログラミング
-- 第1章 SQL Server 2005の環境とツール
---------------------------------------------------------------------

---------------------------------------------------------------------
-- 1.2 SQL Server Management Studioでの基本操作
---------------------------------------------------------------------

EXEC sp_who


SELECT 'Hello World'
SELECT * FROM dbo.EqType


CREATE PROCEDURE ap_Hello
AS
SELECT 'Hello World'
SELECT * FROM dbo.EqType
RETURN


USE Asset5
GO


DROP PROCEDURE ap_Hello
GO
CREATE PROCEDURE ap_Hello
AS
SELECT 'Hello World'
SELECT * FROM dbo.Inventory
RETURN
GO


ALTER PROCEDURE ap_Hello
AS
SELECT 'Hello World again!'
SELECT * FROM dbo.Inventory
RETURN
GO


ALTER PROCEDURE ap_Hello
--AS
SELECT 'Hello World again!'
SELECT * FROM dbo.Inventory
RETURN
GO

