美文网首页
create table as select

create table as select

作者: 大雨滂沱在关外 | 来源:发表于2019-12-02 16:30 被阅读0次

    创建表使用 as select 如下图:

    字段类型定义的非常随便,product_group和series 生成的是text类型的字段 ,family_code 生成的12位varchar类型(当然,查询出来的family_code 都是12位的) 如上图所示,再修改数据的时候,因为类型的长度的问题出错。继而写了alter语句。

    总结:不建议使用create table as select。

    相关文章

      网友评论

          本文标题:create table as select

          本文链接:https://www.haomeiwen.com/subject/owdfgctx.html