簡體   English   中英

是否可以在LIKE子句中使用mysql函數

[英]Is it possible to use mysql function in LIKE clause

我只是想知道是否可以在where子句中使用mysql函數。 我知道函數可以在where =子句中使用。

我想通過like子句使用此語句

select year from t where year=year(now) -- possible

select year from t where year like 'year(now)'  --- is there any way to use function in like clause using quotes

可能嗎?

是。 這是可能的。 但是我會避免這樣做,因為根據功能的不同,它可能會影響性能。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM