ALTER user HR IDENTIFIED BY hrxxxxx
The above cmd will change the pwd of hr to hrxxxxx.
FOR MYSQL:
ALTER TABLE "table_name" CHANGE "old_column_name" "new_column_name" DATATYPE;
ALTER TABLE school_scores CHANGE 计划 计划人数 int(11);
ALTER TABLE school_scores CHANGE 实际投档人数投档 实际投档人数 int(11);
FOR ORACLE:
ALTER TABLE "table_name" RENAME COLUMN "old_column_name" TO "new_column_name";
-- Mysql practice ALTER TABLE user_album CHANGE rxUserEntity_mobile_number rx_user_mobile_num varchar(20); -- rename a column ALTER TABLE dev.user_album MODIFY COLUMN rx_user_mobile_num VARCHAR(20) NOT NULL; -- column type ALTER TABLE user_album ADD CONSTRAINT fk_rx_user_mobile_number FOREIGN KEY (rx_user_mobile_num) REFERENCES rx_user(mobile_number); -- add a fk ALTER TABLE user_album DROP COLUMN user_name_id; -- drop a column alter table user_album drop foreign key FK_p6rv3ddmwvkjecxcioqcuyv2f; -- drop fk constraint