Select particular table name from given database in db2

Here is a simple DB2 - SQL  command to find a particular table name exists in given database name.

SELECT TABNAME FROM SYSCAT.TABLES WHERE TABNAME =''

Example :
Database name : FRSDB
Table Name : DB_VERSION


C:\Users\ADMIN>db2 connect to frsdb

   Database Connection Information

 Database server        = DB2/NT64 10.1.0
 SQL authorization ID   = KRISHNA
 Local database alias   = FRSDB


C:\Users\ADMIN>db2 SELECT TABNAME FROM SYSCAT.TABLES WHERE TABNAME ='DB_VERSION'

TABNAME
--------------------------------------------------------------------------------------------------------------------------------
DB_VERSION

  1 record(s) selected.


C:\Users\ADMIN>


0 comments to "Select particular table name from given database in db2"

Post a Comment

Who ever writes Inappropriate/Vulgar comments to context, generally want to be anonymous …So I hope U r not the one like that?
For lazy logs u can at least use Name/URL option which don’t even require any sign-in, good thing is that it can accept your lovely nick name also and URL is not mandatory too.
Thanks for your patience
~Krishna(I love "Transparency")
వీలయితే నాల్గు పోస్టులు ...కుదురితే ఒక కామెంటూ ...

Translate

Enter your email address:

Buffs ...

Visitors


hits counter
View My StatsCheck Google Page Rank

Add to Google Reader or Homepage

Bookmark and Share

Tags


Powered by WidgetsForFree