trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anoop Sharma <anoop.sha...@esgyn.com>
Subject RE: In sqlci: how to show column names and associated data types?
Date Thu, 07 Apr 2016 19:15:06 GMT
to add to what has already been mentioned, one can also use
traf metadata views to look at table/column details in a relational way.

  select * from "_MD_".columns_view where schema_name = '<sch>' and
table_name = '<tab>';

will show details of all columns in table <tab>

invoke "_MD_".columns_view
will show the columns that make up the view columns_view.

anoop

-----Original Message-----
From: Qifan Chen [mailto:qifan.chen@esgyn.com]
Sent: Thursday, April 7, 2016 12:04 PM
To: dev <dev@trafodion.incubator.apache.org>
Subject: Re: In sqlci: how to show column names and associated data types?

Any SQL actions from within sqlci can be logged via the log command.

log <logfile> clear;  -- start logging into <logfile>.  Clear any content in
<logfile> first.

showddl <t>;

log;  --stop logging

--Qifan

On Thu, Apr 7, 2016 at 1:56 PM, Selva Govindarajan <
selva.govindarajan@esgyn.com> wrote:

> You can either issue
>
> invoke trafodion.<schema_name>.tablename or showddl
> trafodion.<schema_name>.tablename
>
> Showddl output is such that it can be used to re-create the table when
> needed.
>
> Selva
>
> On Thu, Apr 7, 2016 at 11:52 AM, Pierre Smits <pierre.smits@gmail.com>
> wrote:
>
> > Hi all,
> >
> > Maybe this is question answered in the documentation/pages already,
> > but I might be overlooking it: how do I, in sqlci, get the
> > information of a
> table
> > (meaning the column names, their data types and such) in a
> > TRAFODION.SCHEMA?
> >
> > Best regards,
> >
> > Pierre Smits
> >
> > ORRTIZ.COM <http://www.orrtiz.com>
> > OFBiz based solutions & services
> >
> > OFBiz Extensions Marketplace
> > http://oem.ofbizci.net/oci-2/
> >
>
>
>
> --
> - cheers
> selvag
>



--
Regards, --Qifan

Mime
View raw message