MySQL : Rename column

Source: https://stackoverflow.com/questions/30290880/rename-a-column-in-mysql

Use the following query:
ALTER TABLE tableName CHANGE `oldcolname` `newcolname` datatype(length);
The RENAME function is used in Oracle databases.
ALTER TABLE tableName RENAME COLUMN "oldcolname" TO "newcolname" datatype(length);
Notice the backticks used for MySQL, whereas double quotes are used for Oracle's syntax. Also note that MySQL 8.0 might not accept backticks. In that case, execute the query without backticks and it will probably work.

Không có nhận xét nào:

api feed with published=false?

  Câu trả lời ngắn gọn là: CÓ . Trên thực tế, đây chính là cách chuẩn nhất để tạo các bài viết chưa hiển thị công khai (bao gồm Bản nháp, B...