Самоучитель SQL. Синтаксис операторов SELECT, INSERT, UPDATE, DELETE в примерах и задачах.
Это связано с тем, что столбец name имеет тип CHAR(30). Для этого типа короткая строка дополняется пробелами до заданного размера (у нас 30 символов). Здесь нам как раз и поможет функция RTRIM
When SQLite compares two strings, it uses a collating sequence or collating function (two terms for the same thing) to determine which string is greater or if the two strings are equal. SQLite has three built-in collating functions: BINARY, NOCASE, and RTRIM.
String Functions: ASCII Char Charindex Concat Concat with + Concat_WS Datalength Difference Format Left LEN Lower Ltrim Nchar Patindex Quotename Replace Replicate Reverse Right
Поэтому вам нужно получить весь набор данных следующим образом: Select r.name as ResName, a.name as AppName from Resouces as r, Applications as a, ApplicationsResources as ar where ar.app_id = a.id and ar.resource_id = r.id. А затем конкат Имя_приложенияпрограммно при...
mysql> SELECT SUBSTRING_INDEX('www.mysql.com', '.', -2); -> 'mysql.com'. Данная функция поддерживает многобайтные величины. LTRIM(str).
If CHAR() is invoked from within the mysql client, binary strings display using hexadecimal notation
select r.name as ResName, a.name as AppName from Resouces as r, Applications as a, ApplicationsResources as ar where ar.app_id = a.id and ar.resource_id = r.id.
Функция CHAR, тесно связанная с функцией ASCII и выполняет обратное действие