Alterations

In this lesson we discuss how to modify various database structures once they are created.

We'll cover the following

Alterations

MySQL allows us to change our mind about the entities we create and alter them. We can rename tables, add, remove, or rename columns, change type of an existing column, etc.

Example Syntax

ALTER TABLE table

CHANGE oldColumnName newColumnName <datatype> <restrictions>;

Connect to the terminal below by clicking in the widget. Once connected, the command line prompt will show up. Enter or copy and paste the command ./DataJek/Lessons/17lesson.sh and wait for the MySQL prompt to start-up.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.