简体   繁体   中英

Create a temp table in Select Query at runtime in MYSQL

i am having a table emp like

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


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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM