pl: Der Trick mit dem default

Beitrag lesen

geht so:

$dbh->do("drop table stings");
$dbh->do(q(
    create table stings(
        sting varchar(123) not null default "---",
        name  varchar(123) not null default '---'
    )
)) or die $@;

$dbh->do(q(insert into stings (name) values(?)),{},"otto");

__END__
mysql> select * from stings;
+-------+------+
| sting | name |
+-------+------+
| ---   | otto |
+-------+------+
1 row in set (0.00 sec)

GG