![]() | |
#1
| |||
| |||
|
|
Field | Type | Null | Key | Default | Extra | +--------+-------------+------+-----+---------+-------+ name | varchar(40) | NO | | NULL | | report | text | YES | | NULL | | +--------+-------------+------+-----+---------+-------+ |
|
name | report | +------+------------------------------------+ joe | Works hard Great employee |
#2
| |||
| |||
|
|
I am just getting started in using the "Text" type in MySQL. Is the following INSERT the proper way to enter newlines in text data? |
|
Is there a way to dump the contents of a text file into a text field? Try LOAD FILE. |
|
Thank you, Joe mysql> describe Employees; +--------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+-------------+------+-----+---------+-------+ | name | varchar(40) | NO | | NULL | | | report | text | YES | | NULL | | +--------+-------------+------+-----+---------+-------+ mysql> INSERT INTO Employees (name, report) VALUES('joe', 'Works hard\nGreat employee\nHire him'); mysql> select * from Employees; +------+------------------------------------+ | name | report | +------+------------------------------------+ | joe | Works hard Great employee Hire him | +------+------------------------------------+ |
#3
| |||
| |||
|
|
Is the following INSERT the proper way to enter newlines in text data? |
|
Is there a way to dump the contents of a text file into a text field? |
#4
| |||
| |||
|
|
Joe Hesse <JoeHesse (AT) gmail (DOT) com> wrote: Is the following INSERT the proper way to enter newlines in text data? RTFM! http://dev.mysql.com/doc/refman/5.1/...ng-syntax.html Is there a way to dump the contents of a text file into a text field? RTFM! http://dev.mysql.com/doc/refman/5.1/en/string- functions.html#function_load-file XL |
![]() |
| Thread Tools | |
| Display Modes | |
| |