USE [TestDB]
GO
/****** Object: Table [dbo].[tblCustomer] Script Date: 01/18/2014 22:01:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblCustomer](
[id] [int] IDENTITY(1,1) NOT NULL,
[name] [nvarchar](100) NULL,
[dat] [date] NULL
) ON [PRIMARY]
GO模糊查询
CREATE PROCEDURE SearchCustomer
-- Add the parameters for the stored procedure here
@name nvarchar(100)
AS
SELECT * FROM dbo.tblCustomer WHERE name LIKE '%'+@name+'%'
GO