You are on page 1of 1

T-SQL is when you use if/then statement on top of SQL coding.

T-SQL is transact sql meaning we have to


apply control structure on top of SQL.

if (exists(select name from sysobjects where name = 'Extract_C' and type = 'V'))

begin

drop view Extract_C;

end;

go

create view Extract_C

as

select CUST_ID as CUST_Id,

CUST_CITY as CUST_City,

CUST_COUNTY as CUST_County,

CUST_STATE as CUST_State,

CUST_COUNTRY as CUST_Country,

CUST_ZIP as CUST_Zip

from C;

go

You might also like