HI,

how can i change column name by query?

Exm:

UPDATE table_name SET column_name='course_title'
WHERE coulumn_name='course_name';

is it?

Like so in MySQL, but you need to add the column type again.

ALTER TABLE table_name CHANGE COLUMN course_name course_title VARCHAR(64)

In SQL Server you can do this:

sp_rename 'table_name.course_name', 'course_title' , 'COLUMN'
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.