Forum Moderators: open
Name
John
Jame
Rick
when it shows it to me it is displayed as:
Name
hn
ame
ck
Now if I query it by just select name from employee; it displays the data properly. Is there anything that I can do to fix the display problem when using select everything from the table? And this seems to only affect the first field.
Help please.
I can email a picture of the command prompt if that will help.
mysql> SELECT * FROM PROJECT
-> ;
+-----------------+---------+-----------+------+
¦ PNAME ¦ PNUMBER ¦ PLOCATION ¦ DNUM ¦
+-----------------+---------+-----------+------+
¦ ductX ¦ 1 ¦ Bellaire ¦ 5
¦ ductY ¦ 2 ¦ Sugarland ¦ 5
¦ ductZ ¦ 3 ¦ Houston ¦ 5
¦ puterization ¦ 10 ¦ Stafford ¦ 4
¦ rganization ¦ 20 ¦ Houston ¦ 1
¦ benefits ¦ 30 ¦ Stafford ¦ 4
+-----------------+---------+-----------+------+
6 rows in set (0.00 sec)
mysql> SELECT PNAME FROM PROJECT;
+-----------------+
¦ PNAME ¦
+-----------------+
¦ ProductX ¦
¦ ProductY ¦
¦ ProductZ ¦
¦ Computerization ¦
¦ Reorganization ¦
¦ Newbenefits ¦
+-----------------+
6 rows in set (0.00 sec)
In the first query it cuts off some of the data even though when I just select the Pname column it shows that the data is there. Why? Please Help
mysql> SELECT HEX(' '), HEX('\r');
+----------+-----------+
¦ HEX(' ') ¦ HEX('\r') ¦
+----------+-----------+
¦ 20 ¦ 0D ¦
+----------+-----------+ mysql> SELECT HEX('Carriage'), HEX('Return'), HEX('Carriage Return'), HEX('Carriage\rReturn')\G *************************** 1. row ***************************
HEX('Carriage'): 4361727269616765
HEX('Return'): 52657475726E
HEX('Carriage Return'): 43617272696167652052657475726E
HEX('Carriage\rReturn'): 43617272696167650D52657475726E
mysql> SELECT 'Carriage\rReturn';
+-----------------+
Return ¦ge
+-----------------+
Return ¦ e
+-----------------+
mysql> SELECT REPLACE('Carriage\rReturn', '\r', '');
+---------------------------------------+
¦ REPLACE('Carriage\rReturn', '\r', '') ¦
+---------------------------------------+
¦ CarriageReturn ¦
+---------------------------------------+