Hi Everyone,
I am trying to do this;-
I am trying to copy all the unique rack numbers from my server table to the new rack table. I could not find info on this on mysql.com and I am currently getting an error about the right syntax to use near 'SELECT.. '.
Is it possible to insert rows like this? I know all the other fields of the new RackData table will be default, but that is not a problem.
Many thanks in advance.
Jez
I am trying to do this;-
Code:
INSERT INTO RackData (rackNumber) VALUES (SELECT DISTINCT Rack FROM Server);
I am trying to copy all the unique rack numbers from my server table to the new rack table. I could not find info on this on mysql.com and I am currently getting an error about the right syntax to use near 'SELECT.. '.
Is it possible to insert rows like this? I know all the other fields of the new RackData table will be default, but that is not a problem.
Many thanks in advance.
Jez