Reputation: 17385
Below link classifies types of table in DB2.
T = Table (untyped)
U = Typed table
V = View (untyped)
W = Typed view
What is the difference between these and which are the conditions where we should use these?
Also, how can we define this during creation of the table ?
Upvotes: 0
Views: 1502
Reputation: 7693
Typed table are defined based on UDT (User defined types). They can have levels in a hierarchy and describe the referenced object (from the model), and that description can be re-used in other tables or even in stored procedures. (In order to create a table with the same structure, it is not necessary to do a create like, but a create table based on the type)
Normal tables are defined based on columns, but that definition cannot be re-used in other objets, and it has to be redefined (redefine the column order and precision, etc.)
Take a look at the documentation: http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.structypes.doc/doc/c0006606.html
Upvotes: 2