List:General Discussion« Previous MessageNext Message »
From:Rolf Hopkins Date:November 16 2000 5:06am
Subject:Re: how to adjust show format!
View as plain text  
There is no online help but the mysql website has a manual containing all
the info you need.  If you look on the Internet hard enough, you will also
find a chinese version of the manual as well.

You should also reply to the list, as you'll get a better response.

> Dear Rolf Hopkins:
>     I am very very glad to see your reply.
>
> In fact, I use load command rather than insert!
>
> The demo table's structure is as following:
> create table pet2(
> name char(10) not null,
> url  char(20) not null,
> unique (name, url)); // indicate the two columns combined is unique!!!
>
> We use the load command to install all data
> "load data local infile "pet.txt" into table pet2"
>
> The content of pet.txt is as following!(threee records here!)
> pet\twww.yahoo.com\n
> dog\twww.cuhk.edu.hk\n
> dog\twww.cuhk.edu.hk\n
> \n

Having two lines like that doesn't seem right especially since you have
unique(name, url).  You can delete one using something like.

delete from pet2 where name='dog' limit 1;

>
>
> "\n" indicates at that position we should add one "\n", i.e. print
> ("\n") into that data file.
> "\t" is the same meaning!
>
> Finally, we just get 2 records, because one record is duplicate one!!!
> pet    www.yahoo.com
> dog   www.cuhk.edu.hk
>
> If I output the result to a file, the result format is correct.
>
> mysql -D database01 < s.my > s.
>
> s.my
> ------------------
> select * from pets;
> ------------------
> the content of s. show the correct result format!!!
>
> I don't know why?
>
>
> Anyway, Thank you very much!
>
> Danyu
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Thread
how to adjust show format!Liu Danyu16 Nov
  • Re: how to adjust show format!Rolf Hopkins16 Nov
  • Re: how to adjust show format!Rolf Hopkins16 Nov
RE: how to adjust show format!QDelpeche16 Nov