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'

Thankx

Be a part of the DaniWeb community

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