# SQL msSQL 搜尋相似 ----- ###### tags: `SQL` 在列表頁使用搜尋時 使用`charindex` 會比 `LIKE` 使用上效能好多了 **要注意使用是邏輯運算** ## charindex('要搜尋的字', 欄位名稱) 搜尋帳號欄位 是否有'o'這個字 ```sql= SELECT * FROM admin_basic SELECT * FROM admin_basic WHERE charindex('o', admin_acc) > 0 ORDER BY id DESC ```  ---- ## charindex() 與 分頁一起使用 同筆記 ROW_NUMBER()+CHARINDEX()SQL問題 SQL子查詢
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up