I’m trying to copy only a single column from a table to a newly created table.
Here is my SQL:
CREATE TABLE whatever(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
uid INT,
can_view TINYINT DEFAULT 0
)
This works fine, however, I need to modify it so it populates the ‘uid’ column with the ‘id’ values from my users table.
Anyone have any idea how to go about this?
I tried
uid INT (SELECT id FROM users)
Which doesn’t seem to work
Create as Select: