Yes, the AUTO_INCREMENT attribute can be used on a column that is not a primary key. However, it is generally recommended to use AUTO_INCREMENT on primary key columns to ensure that each row has a unique identifier.
When used on a non-primary key column, the AUTO_INCREMENT will still function the same way, automatically generating unique values for that column. However, keep in mind that the column must still be indexed (either as a primary key or with a unique index) to maintain the uniqueness of the values.
