复制代码 代码如下:
Use pubs
declare @find varchar(30)
set @find='Ring%'
select au_lname,au_fname,phone
from authors
where au_lname like @find
复制代码 代码如下:
USE pubs
SET NOCOUNT ON
GO
DECLARE @pub_id char(4), @hire_date datetime
SET @pub_id = '0877'
SET @hire_date = '1/01/93'
-- Here is the SELECT statement syntax to assign values to two local
-- variables.
-- SELECT @pub_id = '0877', @hire_date = '1/01/93'
SET NOCOUNT OFF
SELECT fname, lname
FROM employee
WHERE pub_id = @pub_id and hire_date >= @hire_date
新闻热点
疑难解答