拼接字段

mysql中 使用concat拼接字段

SELECT Concat(username,'(',weight,')') AS info FROM userinfo WHERE weight>150

得到的info可以被客户端使用

 

算术计算

对检索的数据进行运算并as为新的列名

SELECT username,weight,weight/SQRT(height/100) AS bmi FROM userinfo WHERE weight>55 ORDER BY weight

 

相关文章:

  • 2022-12-23
  • 2021-11-30
  • 2021-11-17
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
  • 2021-12-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-01-16
  • 2022-12-23
相关资源
相似解决方案