模糊查询sqlserver
时间: 2023-08-18 19:04:42 浏览: 110
模糊查询sqlserver的写法如下所示:
```sql
select * from 表名 where 列名 like '%关键字%'
```
其中,表名是要查询的表的名称,列名是要查询的列的名称,关键字是要匹配的关键字。在这个例子中,如果要查询出表TestInsertBase中Name以“王”字为首的所有数据,可以使用以下SQL语句:
```sql
select * from TestInsertBase where Name like '王%'
```
这条SQL语句会返回表TestInsertBase中Name以“王”字为首的所有数据。
#### 引用[.reference_title]
- *1* *2* [mybatis模糊查询sqlserver和mysql的写法](https://blog.csdn.net/s_156/article/details/119445280)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Sqlserver模糊查询几种方式记录](https://blog.csdn.net/qq_35351282/article/details/119881355)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文