Files
rdb/man/datatype.man
T

56 lines
1.2 KiB
Groff

.TH datatype "" "" "/rdb Command"
.PC "Display the data type of each column selected"
\fBdatatype [ \-l ] [ \fIcolumn ... \fB] < \fItable\fR
.PP
.II "data type"
.II "type of data"
The command
.B datatype
displays the type of data contained in each
.IR column .
If you do not name a
.I column
on the command line,
.B datatype
calculates and displays all of
.IR table 's
columns.
.SH Options
The \fB\-l\fR option tells
.B datatype
to print the entire contents of
.IR table ,
in addition to information about each
.IR column .
.SH Code
.IP \fB\-1\fR
Character strings with nonnumeric data.
.IP \fB0\fR
Integer number.
.IP \fB1,2...\fR
Floating-point number (number of digits to the right of the decimal).
.SH Example
The following shows a sample output of
.BR datatype :
.DM
Int Char Float2 Float4
--- ---- ------ ------
1 a 1.2 1.1234
745 zzzz 8.54 12.3
--- ---- ------ ------
0 -1 2 4
.DE
.PP
Note that the
.I Int
column has only integers in it (code 0), the
.I Char
column has characters in it (code -1), and the two
.I Float
columns have different precisions (positive numbers codes).
Note that the float precision is the maximum.
.SH "See Also"
.B
ascii, chr, dbdict
.R