if OBJECT_ID('Sales.USACusts') is not null drop view Sales.USACusts; go create view Sales.USACusts as select custid,companyname,contactname,contacttitle,address,city,region,postalcode,country,phone,fax from Sales.Customers where country=N'USA'; go 在数…
if exists (select 1 from sysobjects where name = 'sysproperties'and xtype = 'V')begin DROP VIEW syspropertiesend GO CREATE VIEW syspropertiesAS SELECT class AS id,Minor_id AS sMallid,* from sys.extended_properties -------在sql server 2005中获取表…