mysql中generated always as的使用
作者:互联网
-- generated always as的使用
CREATE TABLE t1(
c1 INT,
c2 DOUBLE(20,19) ,
c3 INT GENERATED ALWAYS AS(c1*2));
SELECT *FROM t1;
INSERT INTO t1(c1,c2) VALUE(2,RAND()*10);
DROP TABLE t1;
concat在mysql中是连接
SELECT CONCAT('a','6','cc');
SELECT IF('男'='男','先生','女士') gender;
标签:always,t1,generated,mysql,TABLE,c1,SELECT 来源: https://www.cnblogs.com/zcxxcvbn/p/15906265.html