copy columns & its contents from table to another
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have two database tables
Now i want to copy column & all its contents called "name" from "old_table" to "new_table" in the field called "name_ar"
I created the column in "new_table" using "ALTER TABLE new_table ADD name_ar TEXT ;" mysql command
Then copied column using "INSERT INTO new table (name_ar) SELECT name FROM old_table" mysql command
Iam not mysql developer so i have a problem now, which is the column contents added to the end of table not from the beginning
Meaning that
How could i copy column to other table & add those contents in the first record in the table not in the end as i found that other columns have null values after adding the fourth column contents
Any help will be apreciated
Thanks for all
mysql
New contributor
add a comment |Â
up vote
0
down vote
favorite
I have two database tables
Now i want to copy column & all its contents called "name" from "old_table" to "new_table" in the field called "name_ar"
I created the column in "new_table" using "ALTER TABLE new_table ADD name_ar TEXT ;" mysql command
Then copied column using "INSERT INTO new table (name_ar) SELECT name FROM old_table" mysql command
Iam not mysql developer so i have a problem now, which is the column contents added to the end of table not from the beginning
Meaning that
How could i copy column to other table & add those contents in the first record in the table not in the end as i found that other columns have null values after adding the fourth column contents
Any help will be apreciated
Thanks for all
mysql
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have two database tables
Now i want to copy column & all its contents called "name" from "old_table" to "new_table" in the field called "name_ar"
I created the column in "new_table" using "ALTER TABLE new_table ADD name_ar TEXT ;" mysql command
Then copied column using "INSERT INTO new table (name_ar) SELECT name FROM old_table" mysql command
Iam not mysql developer so i have a problem now, which is the column contents added to the end of table not from the beginning
Meaning that
How could i copy column to other table & add those contents in the first record in the table not in the end as i found that other columns have null values after adding the fourth column contents
Any help will be apreciated
Thanks for all
mysql
New contributor
I have two database tables
Now i want to copy column & all its contents called "name" from "old_table" to "new_table" in the field called "name_ar"
I created the column in "new_table" using "ALTER TABLE new_table ADD name_ar TEXT ;" mysql command
Then copied column using "INSERT INTO new table (name_ar) SELECT name FROM old_table" mysql command
Iam not mysql developer so i have a problem now, which is the column contents added to the end of table not from the beginning
Meaning that
How could i copy column to other table & add those contents in the first record in the table not in the end as i found that other columns have null values after adding the fourth column contents
Any help will be apreciated
Thanks for all
mysql
mysql
New contributor
New contributor
New contributor
asked 4 mins ago
nevermind ViRu
31
31
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
nevermind ViRu is a new contributor. Be nice, and check out our Code of Conduct.
nevermind ViRu is a new contributor. Be nice, and check out our Code of Conduct.
nevermind ViRu is a new contributor. Be nice, and check out our Code of Conduct.
nevermind ViRu is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479641%2fcopy-columns-its-contents-from-table-to-another%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password