sql查询多条数据

本文介绍了如何使用SQL语句从数据库中查询并获取多条数据,涵盖了SELECT语句的基本用法,包括WHERE子句的应用,以及如何通过ORDER BY和LIMIT来限制返回结果的数量。无论你是初学者还是经验丰富的开发者,这些基本技巧都能帮助你更高效地操作数据库。
摘要由CSDN通过智能技术生成
SELECT IFNULL(TRUNCATE(tudi,2),0.00) AS tudigongxian,
    IFNULL(TRUNCATE(youhuijing,2),0.00) AS youhuijing,
    IFNULL(TRUNCATE(choujiang,2),0.00) AS drawMoney,
    IFNULL(TRUNCATE(tixian,2),0.00) AS tixian, u.tel AS tel,u.headportrait_url AS headportrait_url,
    IFNULL(TRUNCATE(u.balance_gm,2),0.00) AS gouwuAccount, 
    IFNULL(TRUNCATE(u.balance_tx,2),0.00) AS tixianAccount,
    IFNULL(TRUNCATE(u.balance,2),0.00)  AS zongAccount,
    IFNULL(TRUNCATE(chongzhi,2),0.00) AS chongzhi,
    IFNULL(TRUNCATE(orderAmount,2),0.00) AS orderAmount,
    IFNULL(TRUNCATE(leiJiMoney,2),0.00) AS leiJiMoney,
    IFNULL(TRUNCATE(orderMoney,2),0.00) AS orderMoney,
    IFNULL(TRUNCATE(saoMaMoney,2),0.00) AS saoMaMoney,
    IFNULL(TRUNCATE(fanBeiZhuanMoney,2),0.00) AS fanBeiZhuanMoney,
    IFNULL(TRUNCATE(duiHuanMoney,2),0.00) AS duiHuanMoney,
    IFNULL(TRUNCATE(vipMoney,2),0.00) AS vipMoney,
    u.nickname AS nickname,u.id AS id
FROM  
  users u LEFT JOIN 
    (SELECT SU
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值