Quantcast
Viewing all articles
Browse latest Browse all 449

Get previous and next row from rows selected with (WHERE) conditions

For example I have this statement:

my name is Joseph and my father's name is Brian

This statement is split by word, like this table:

IDword
1my
2name
3is
4Joseph
5and
6my
7father's
8name
9is
10Brian

I want to get previous and next word of each word

For example I want to get previous and next word of "name":

mynameis
father'snameis

How could I get this result?


Viewing all articles
Browse latest Browse all 449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>