使用LTRIM和RTRIM [英] Using LTRIM and RTRIM

查看:73
本文介绍了使用LTRIM和RTRIM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以通过在sqlserver中编写查询来告诉我有关使用LTrim和RTrim的信息,这将非常有帮助.

其实我对LTRIM和RTRIM条件有点困惑.

我还希望获得有关使用联接和条件的很好的知识.
如果有什么方法可以使联接和在特定条件下联接多个表达到完美,那么我可以做得更好.

谢谢&问候..

Can any one tell me about using LTrim and RTrim by writing a query in sqlserver, it would be very helpfull.

Actually I am bit confused using LTRIM and RTRIM conditions.

I would also want to get very good knowledge in using joins and conditions.
If there is any way to get perfect in joins and joining multiple tables with particular conditions, so that i can become thorough with it.

Thanks & Regards..

推荐答案

LTRIM(str):删除字符串开头的所有空格.
RTRIM(str):删除字符串末尾的所有空格.
LTRIM(str): Removes all white spaces from the beginning of the string.
RTRIM(str): Removes all white spaces at the end of the string.
Example 1:
SELECT TRIM(''   Sample   '');
Result: ''Sample''

Example 2:
SELECT LTRIM(''   Sample   '');
Result: ''Sample   ''

Example 3:
SELECT RTRIM(''   Sample   '');
Result: ''   Sample''


这些链接提供了基本信息.
http://msdn.microsoft.com/en-us/library/ms177827 (v = sql.100).aspx [ http://msdn.microsoft.com/en-us/library/ms178660 (v = sql.100).aspx [
These link provide basic information.
http://msdn.microsoft.com/en-us/library/ms177827(v=sql.100).aspx[^]

http://msdn.microsoft.com/en-us/library/ms178660(v=sql.100).aspx[^]

Search Google you can find tons of articles that will be helpful to you.


LTRIM:删除前导空格后返回字符表达式.

RTRIM:截断所有尾随空格后返回一个字符串.

我将从
http://www.w3schools.com/sql/sql_join.asp 开始学习JOINS.
LTRIM : Returns a character expression after removing leading blanks.

RTRIM : Returns a character string after truncating all trailing blanks.

I would start from http://www.w3schools.com/sql/sql_join.asp for learning about JOINS.


这篇关于使用LTRIM和RTRIM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆