Syntax
LEFT (string, length)
Example:
SELECT date AS year FROM news
SELECT left(date,4) AS year FROM news
Reference:
http://stackoverflow.com/questions/12504985/how-to-take-last-four-characters-from-a-varchar
LEFT (string, length)
SELECT date AS year FROM news
SELECT left(date,4) AS year FROM news
This comment has been removed by the author.
ReplyDeleteHello Xenia! How are you? It seems you are working on mysql and php
ReplyDelete