func_concat.result
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· RESULT 代码 · 共 85 行
RESULT
85 行
DROP TABLE IF EXISTS t1;CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );INSERT INTO t1 VALUES (1413006,'idlfmv'),(1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd');SELECT number, alpha, CONCAT_WS('<---->',number,alpha) AS newFROM t1 GROUP BY number;number alpha new1413006 idlfmv 1413006<---->idlfmv1413065 smpsfz 1413065<---->smpsfz1413127 sljrhx 1413127<---->sljrhx1413304 qerfnd 1413304<---->qerfndSELECT CONCAT_WS('<---->',number,alpha) AS newFROM t1 GROUP BY new LIMIT 1;new1413006<---->idlfmvSELECT number, alpha, CONCAT_WS('<->',number,alpha) AS newFROM t1 GROUP BY new LIMIT 1;number alpha new1413006 idlfmv 1413006<->idlfmvSELECT number, alpha, CONCAT_WS('-',number,alpha,alpha,alpha,alpha,alpha,alpha,alpha) AS newFROM t1 GROUP BY new LIMIT 1;number alpha new1413006 idlfmv 1413006-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmv-idlfmvSELECT number, alpha, CONCAT_WS('<------------------>',number,alpha) AS newFROM t1 GROUP BY new LIMIT 1;number alpha new1413006 idlfmv 1413006<------------------>idlfmvdrop table t1;create table t1 (a char(4), b double, c date, d tinyint(4));insert into t1 values ('AAAA', 105, '2003-03-01', 1);select * from t1 where concat(A,C,B,D) = 'AAAA2003-03-011051';a b c dAAAA 105 2003-03-01 1drop table t1;select 'a' union select concat('a', -4);aaa-4select 'a' union select concat('a', -4.5);aaa-4.5select 'a' union select concat('a', -(4 + 1));aaa-5select 'a' union select concat('a', 4 - 5);aaa-1select 'a' union select concat('a', -'3');aaa-3select 'a' union select concat('a', -concat('3',4));aaa-34select 'a' union select concat('a', -0);aaa0select 'a' union select concat('a', -0.0);aaa0.0select 'a' union select concat('a', -0.0000);aaa0.0000select concat((select x from (select 'a' as x) as t1 ),(select y from (select 'b' as y) as t2 )) from (select 1 union select 2 )as t3;concat((select x from (select 'a' as x) as t1 ),(select y from (select 'b' as y) as t2 ))ababcreate table t1(f1 varchar(6)) charset=utf8;insert into t1 values ("123456");select concat(f1, 2) a from t1 union select 'x' a from t1;a1234562xdrop table t1;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?