标签:多少 orm smis order mat count name hang pre
select table_schema,table_name from information_schema.columns where column_name = '字段名';
select count(*) FROM gasmis_shangxian.his_fuel_record;
SELECT SUM(a) from(SELECT COUNT(*) a FROM gasmis_shangxian.his_fuel_record
UNION
SELECT COUNT(*)a FROM gasmis_shangxian.his_account_journal
UNION
SELECT COUNT(*) a FROM gasmis_shangxian.his_oilsys_fuel_record) as aa
- > select table_schema,table_name from information_schema.columns where column_name = '字段名'
update
会主键冲突,使用order by (神奇的order by 用法)UPDATE normalflow_list
SET flow_seqno = flow_seqno + 1
WHERE
flow_id = '010101'
AND flow_seqno > 2
ORDER BY
flow_seqno DESC;
获取某一列的最大值
select max(volumu) from table_name
select max(flow_seqno) from normalflow_list where flow_id = '010101';
标签:多少 orm smis order mat count name hang pre
原文地址:https://www.cnblogs.com/sfth/p/11332532.html