File: column_info.pl

package info (click to toggle)
libdbd-odbc-perl 1.37-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,272 kB
  • sloc: perl: 7,932; ansic: 5,991; makefile: 33; sql: 8
file content (22 lines) | stat: -rw-r--r-- 442 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# $Id$
# column_info
use DBI;
use strict;
use warnings;

my $h = DBI->connect;

eval {$h->do(q{drop table martin})};

my $table = << 'EOT';
create table martin (a int default NULL,
                     b int default 1,
                     c char(20) default 'fred',
                     d varchar(30) default current_user,
                     e int)
EOT

$h->do($table);

DBI::dump_results($h->column_info(undef, undef, 'martin', undef));