7.2
拼接字段
select n_progid||'test' from co_schedule;
去除多余的空格
select trim(' test ');默认去掉两端的空格
select trim(leading 'x' from 'xTomxx');
select trim(trailing 'x' from 'xTomxx');
别名
select n_progid||'test' as test from co_schedule;
select prod_id,quantity,item_price,quantity*item_price as total_price from orders ;
8.2
文本处理函数
upper() lower() length()
拼接字段
select n_progid||'test' from co_schedule;
去除多余的空格
select trim(' test ');默认去掉两端的空格
select trim(leading 'x' from 'xTomxx');
select trim(trailing 'x' from 'xTomxx');
别名
select n_progid||'test' as test from co_schedule;
select prod_id,quantity,item_price,quantity*item_price as total_price from orders ;
8.2
文本处理函数
upper() lower() length()
SQL字段操作与文本处理
本文介绍了SQL中字段的操作技巧,包括字段拼接、去除多余空格及使用别名等实用方法。此外还涵盖了基本的文本处理函数如upper、lower和length等,帮助读者更好地理解和运用SQL进行数据处理。
321

被折叠的 条评论
为什么被折叠?



