Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Viewing all articles
Browse latest Browse all 6262

数据表字段的删除或添加语句 数据库 数据库学习 数据表字段 删除添加语句

$
0
0
数据表字段的删除或添加语句,以下操作是在已有的mysql数据库表中进行 删除语句: alter table 表名 drop column 字段名; 如: alter table zgglmag drop column dlcode;
添加语句: alter table 表名 add column 字段名 类型 默认缺省值 备注;
如: alter table `user_movement_log` Add column GatewayId int not null default 0
给指定字段添加一个值在前面或后面

给指定字段追一个值在前面或是后面:

UPDATE `name` t SET t.username = CONCAT(t.username,"ooo") -- 后

UPDATE `name` t SET t.username = CONCAT("ooo",t.username) -- 前

UPDATE `name` t SET t.username = CONCAT("ooo",t.username,"ooo") --前后


Viewing all articles
Browse latest Browse all 6262

Latest Images

Trending Articles