0

i am having a table emp like

____________________________
ID | Name  | Address
____________________________
 1 | Jack  | Street  On Road
 2 | Jill  | Park Side Lane

I want to create a table at SELECT runtime that will create a new table on the basis of address spilited with every space. Something Like


ID | WORD   | EMP_ID
 1 | Street | 1
 2 | On     | 1
 3 | Road   | 1
 4 | Park   | 2
 5 | Side   | 2
 6 | Lane   | 2

rAVi
  • 164
  • 2
  • 13

1 Answers1

0

I would suggest create a user defined function as given in this post How to split the name string in mysql? and use the same in your query.

Community
  • 1
  • 1
Krishna
  • 438
  • 5
  • 18