Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you add a column to a table view. 2

Status
Not open for further replies.

AnthonyGeorge

Technical User
Jun 3, 2004
46
GB
I am writing a script that will add a column to a table

alter table <table_name> add <column_name>

This table has a view so I have to add that column to that view, no idea how to do this.

Thanks for any help.

Tony
 
Worked it out, you have to drop the view then do a new create view select statement.

Tony
 
You don't actually have to drop the view just have

Code:
CREATE OR REPLACE VIEW my_view
AS
SELECT *
FROM   mytable

instead of


Code:
CREATE VIEW my_view
AS
SELECT *
FROM   mytable
 
Thanks cuts down on the scripts I was going to write.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top