---------------------------------MySQL-----------------------------------------------------
select
'I love you' as phrase,
left ('I love you', 1),
mid('I love you', 3, 4),
right('I love you', 3)
phrase |left ('I love you', 1) |mid('I love you', 3, 4) |right('I love you', 3) |
-----------|-----------------------|------------------------|-----------------------|
I love you |I |love |you |
-------------------------------SQL Server----------------------------------------------------
select
'I love you' as phrase,
left ('I love you', 1),
right('I love you', 3),
--mid('I love you', 3, 4),
right(left('I love you', 6),4)
phrase |left ('I love you', 1) |right('I love you', 3) |right(left('I love you', 6),4) |
-----------|-----------------------|-----------------------|-------------------------------|
I love you |I |you |love |
-------------------------------PostgreSQL----------------------------------------------------
select
'I love you' as phrase,
left ('I love you', 1),
right('I love you', 3),
--mid('I love you', 3, 4),
right(left('I love you', 6),4)
phrase |left ('I love you', 1) |right('I love you', 3) |right(left('I love you', 6),4) |
-----------|-----------------------|-----------------------|-------------------------------|
I love you |I |you |love |