sql mosaic character --sql

   SELECT
	project_id as projectId,
	account_name as accountName,
	account as account,
	billing_time as billingTime,
	spend_type as spendType
FROM
	zj_bookkeeping
WHERE
deleted='0'
AND	((convert(billing_time,DATETIME) like '%${StartingTime}%') or(convert(billing_time,DATETIME) like '%${EndTime}%'))
     <if test="spendType !=null and spendType !='' ">
         and spend_type=#{spendType}
     </if>
        and project_id=#{projectId}
    </select>
%${StartingTime}%
Published 131 original articles · won praise 42 · views 4638

Guess you like

Origin blog.csdn.net/qq_43618030/article/details/104028780
SQL