Wednesday, December 15, 2010

IBM DB2 commands......

  1. How to insert text that contains an apostrophe??
insert into TABLENAME (COLUMN NAME) values('Knowledge''s Power')


Now the output will be like
------------------------
Knowledge's Power

------------------------

2 . How to see tablespaces and containers...........

db2 list tablespaces












-------will give you list of all table spaces.............

db2 list tablespace containers for 2

--------here 2 is the tablespaceID for which you want to see all containers..............

db2inst1@user:~> db2 list tablespace containers for 2

Tablespace Containers for Tablespace 2

Container ID = 0

Name = /home/db2inst1/db2inst1/NODE0000/SQL00039/SQLT0002.0

Type = Path

-------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment