MySQL TENSE
//modify table to add primary key
alter table pcc3register add primary key( id);
alter table pcc3register change id id int auto_increment;
//change field type and add primary key auto_increment;
alter table test change a a int primary key auto_increment;
//truncate table
truncate table business.pcc3register
//change field type and name
alter table pcc3register change motxt motxtcontent varchar(500) ;
//add column to table
alter table pcc3register add motxturl varchar(100) ;
//set default
alter table pcc3register add (registerdate timestamp default now() );
//add columns
alter table pcc3register add (mopic varchar(100),motxt varchar(500) );
//grant
grant select,insert,update on mms.* to daful1@”%” identified by “tom8*8mad”;
show grants for root@‘localhost’;
grant all on *.* to ‘abc’@192.168.1.7 identified by ‘abcdef’;
REVOKE privileges (columns) ON what FROM user
revoke select on mysql.* from webUser;
you can’t create two timestamp datetype column in a table in mysql !!
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/100543.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...