T-SQL Tutorial

T-SQL Alter View


Alter View Example

CREATE VIEW CustomersList
  AS
SELECT c.customer_id, c.customer_name, ctr.contract_id, ctr.amount
  FROM customers c, contracts ctr
WHERE c.customer_id = ctr.customer_id
     AND c.customer_type='CC' ;

Customer_IdCustomer_NameContract_IdAmount
1CUSTOMER_11400
1CUSTOMER_141000
4CUSTOMER_46900

ALTER VIEW CustomersList
  AS
SELECT c.customer_id, c.customer_name, ctr.amount
  FROM customers c, contracts ctr
WHERE c.customer_id = ctr.customer_id
     AND c.customer_type='CC' ;

Customer_IdCustomer_NameAmount
1CUSTOMER_1400
1CUSTOMER_11000
4CUSTOMER_4900