Hello
The problem I am experiencing is the output from the select statement
below. The table breaks up on the left side and loses information.
Yet, when I run the select command from a batch file (second group), it
looks as if everything is in order - tab separated fields.
Another problem (I think) is the null (\N) fields became 'N' under remarks
in the 6th and 7th rows.
(This example is from the MySQL manual tutorial.)
Can anyone point out the error if there is one? Many thanks for any
help offered.
Chris
mysql> select * from event;
+----------+------------+----------+------------------------------+
| name | date | type | remark |
+----------+------------+----------+------------------------------+
|Fluffy | 1995-05-15 | litter | 4 kittens, 3 female, 1 male
|Buffy | 1993-06-23 | litter | 5 puppies, 2 female, 3 male
| | 1994-06-19 | litter | 3 puppies, 3 female
|rpy | 1999-03-21 | vet | needed beak straightened
|8-03 | vet | broken rib
|nnel | N
|nnel | N
| | 1998-08-28 | birthday | Gave him a new chew toy
|laws | 1998-03-17 | birthday | Gave him a new flea collar
|98-12-09 | birthday | First birthday
+----------+------------+----------+------------------------------+
10 rows in set (0.00 sec)
C:\mysql>mysql < batch_file.txt
name date type remark
Fluffy 1995-05-15 litter 4 kittens, 3 female, 1 male
Buffy 1993-06-23 litter 5 puppies, 2 female, 3 male
Buffy 1994-06-19 litter 3 puppies, 3 female
Chirpy 1999-03-21 vet needed beak straightened
Slim 1997-08-03 vet broken rib
Bowser 1991-10-12 kennel N
Fang 1991-10-12 kennel N
Fang 1998-08-28 birthday Gave him a new chew toy
Claws 1998-03-17 birthday Gave him a new flea collar
Whistler 1998-12-09 birthday First birthday
mysql> describe event;
+--------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| date | date | YES | | NULL | |
| type | varchar(15) | YES | | NULL | |
| remark | varchar(255) | YES | | NULL | |
+--------+--------------+------+-----+---------+-------+
4 rows in set (0.00 sec)