企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
>[info] >![](https://box.kancloud.cn/74f42b4f7d7021360652ff96daa73bd9_911x691.png) >. - 添加表字段 ```` alter table 表名称 change 字段名称 字段名称 字段类型 [是否允许非空]; alter table 【table1】 add 【transactor】 varchar(10) not Null; alter table _表名_ add _字段名称_ varchar(10) not Null; alter table table1 add transactor varchar(10) not Null; alter table fa_companies add status tinyint ; ALTER TABLE `fa_companies` ADD `status` TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否被删除0=正常1=删除' AFTER `create_time` ```` >[info]原生MySQL >关联查询 ```` select from_base64(fa_ninty9_user.name), -- fa_ninty9_user.name, fa_ninty9_user.id, fa_cardandpackage.card_name, fa_orders.consume_price, from_unixtime(fa_orders.pay_time), fa_ninty9_user.mobile from fa_orders inner join fa_order_detail on fa_order_detail.order_id = fa_orders.order_id inner join fa_cardandpackage on fa_cardandpackage.id = fa_order_detail.product_id inner join fa_ninty9_user on fa_orders.user_id = fa_ninty9_user.id where fa_order_detail.product_type = 0 and fa_orders.pay_time is not null and fa_orders.pay_time > unix_timestamp('2018-09-01 00:00:00'); ```` >[info]a ```` select -- from_base64(fa_ninty9_user.name), -- fa_ninty9_user.name, -- fa_ninty9_user.id, fa_cardandpackage.card_name, fa_orders.consume_price, from_unixtime(fa_orders.pay_time) -- fa_ninty9_user.mobile from fa_orders inner join fa_order_detail on fa_order_detail.order_id = fa_orders.order_id inner join fa_cardandpackage on fa_cardandpackage.id = fa_order_detail.product_id -- inner join fa_ninty9_user -- on fa_orders.user_id = fa_ninty9_user.id where fa_order_detail.product_type = 0 and fa_orders.pay_time is not null ====================== ```` >[danger]FROM_UNIXTIME select *, id,user_id,card_id, FROM_UNIXTIME(expiry_time), FROM_UNIXTIME(create_time) FROM fa_report_reminders where user_id=8274 -- where user_id=8274 =