bharani kumar wrote:
Hi

My fields something like

hospital1,hospital2,hospital3,patientname,
[...]
i know , i can display all hospital code with unique , but i dont in the
single column , with unique record,

Can you tell me how to do this ?
Would it be possible to reconsider your table design?

Instead of having the above, have something such as:

Person(ID,Name)

Hospital(ID,Name,Code)

LinkTable(ID,PersonID,HospitalID)

You'd then have something such as:

Person(1,John)
Hospital(800,"Bart's London",1234)
LinkTable(1000,1,800)

You'd then be able to find all of the distinct hospital codes by doing select distinct code from hospital.

Apologies if this isn't possible.

Gary

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to