Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
17 votes
1 answer
24k views

Autoincrement primary key in CREATE TABLE ... AS SELECT

I created table using a complicated select query via CREATE TABLE ... AS SELECT.... How can I add an autoincrement primary key in this query? For example: create table `user_mv` select `user`.`...
Arash Mousavi's user avatar