What is first row ? You have to define this. Records is not store in any particular order in the database. So there isn't FIRST or LAST record. The ordering of record is defined by the ORDER BY clause in the SELECT statement.
ok little change i want for each companyu in the same row all the sotck owner like thos table1.companyid,table2.stockownername1,table2.stockownername2.... how can i do this?
Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
BUT it's hard to figure out what you're asking without an example. Please post as khtan has asked (table structure, some sample data and the result that you want)...