(1) In SQL2000 or above, you may do this:
select *
from syscolumns
where id = object_id('pr_get_sales_data')
(2) In SQL2005 or above, you may do this:
select *
from information_schema.parameters
where specific_name = 'pr_get_sales_data'
select *
from syscolumns
where id = object_id('pr_get_sales_data')
select *
from information_schema.parameters
where specific_name = 'pr_get_sales_data'
SQLEXPR.EXE ADDLOCAL=SQL_Engine INSTANCENAME=testsql /qb
create view vw_test1
with schemabinding
as
select cust_id, total_amt = sum(amt), count = count_big(*)
from invoice
group by cust_id
go
create unique clustered index ix_vw_test1
on vw_test1 (cust_id)
go
select *
from vw_test1 with (noexpand)
http://technet.microsoft.com/en-us/library/ms191432.aspx
http://technet.microsoft.com/en-us/library/cc917715.aspx