数据库命令

1、把表mms_group的gbcode列置空

UPDATE mms_group set gbcode=''

 

2、从表mon_channel中查找channelname字段为“07宁波特勤一中队通信室%”的列

SELECT *from mon_channel where channelname like '07宁波特勤一中队通信室%'

 

3、删除行
DELETE from mon_channel where channelid='10.227.123.62@nb.zj.xf_00'

4、

删除表内容,结构还在

truncate gbcode_dict

删除表结构

drop table gbcode_dict

 

5、在map_overlay表中字段datatype为空时插入channel

update map_overlay set datatype='channel' where datatype IS Null

 

6、查询map_overlay表中有多少条数据

select count(1) from map_overlay
 
 
7、SELECT *from map_overlay

-- update map_overlay set lat='' ,lng='',datatype='channel'
-- DELETE from map_overlay
where name like 't000%';

8.更改maps.plan_channel表的channelId字段的所有值(如123@gz_00会被改成123@yj.sf_00),最好先查询在更新值
UPDATE maps.plan_channel set channelId=concat(substring_index(channelId,'@',1),'@yj.sf_00')
SELECT a.*,concat(substring_index(channelId,'@',1),'@yj.sf_00') FROM plan_channel a   (把plan_channel表名重命名为a)
posted @ 2017-05-18 13:01  宁馨儿(阳阳)  阅读(143)  评论(0编辑  收藏  举报