set @name = '%奥迪%'

select * from car where name like @name

 

set @user_id='1000555144';
set @id=(select id from customer where user_id =@user_id);

 

 

set @find='宝马'
if(@find='宝马')
begin
 print '宝马汽车'
 select * from Car where name like '%'+@find+'%' 
end
else 
begin
 print '其它汽车'
 select * from Car
end

 

 

其他见 https://www.cnblogs.com/woniu-net/p/4770312.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-27
  • 2021-11-24
  • 2021-11-25
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
猜你喜欢
  • 2021-12-26
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案