DB2: Views Cheat Sheet

Creating a view

db2 create view <view_name> (<col_name>,
<col_name1...) as select <cols>.. 
from <table_name> 

Modifying a view

db2 alter view <view_name> alter <col_name> 
add scope <table_or_view_name> 

Dropping the view

db2 drop view <view_name> 

Leave a Reply

Your email address will not be published. Required fields are marked *