随笔分类 -  SQL

摘要:--增加大字段项 alter table 表名 add hehe clob; --将需要改成大字段的项内容copy到大字段中 update 表名 set hehe=name1; --删除原有字段 alter table 表名 drop column name1; --将大字段名改成原字段名 alter table 表名 rename column hehe to na... 阅读全文
posted @ 2018-06-14 10:35 褚牛牛 阅读(964) 评论(0) 推荐(0)
摘要:SQL 条件语句使用不等于‘<>’的筛选条件,会将字段为null的数据也当做满足不等于的条件而将数据筛选掉。 用 select * from table where name<>1查询时得到的结果为: 第三列为null也会被筛选掉 阅读全文
posted @ 2018-06-11 11:06 褚牛牛 阅读(1517) 评论(0) 推荐(0)