Home Databases pgSql How to copy a columns data from one table into a column in another table using postgres?
 
 
 

How to copy a columns data from one table into a column in another table using postgres?

PDF Print E-mail

Question: How to copy a columns data from one table into a column in another table using postgres? Eg. name columns data from the users table into name column in the new_users table.

Answer:

Execute the query below with different column names and table names and all the data for a specific column will be copied over to the selected column in another table.

INSERT INTO n_owners(owner_name) SELECT owner_name FROM owners;

+/-
  • sandeep - HOw to use field of one table into another table i
    sir i have a problem that , there are two tables in joomla database
    "jos_vm_product_review" & "jos_vm_product" . now there is a
    field in "jos_vm_product_review" named "user_rating" and i want
    to use that field into "jos_vm_product" table. Means when a user rating
    any product that rating also store in “jos_vm_product" table.
  • TechPortal - @sandeep
    You might need to alter the VirtueMart PHP files in order to accomplish this. So
    whenever the values get stored in jos_vm_product_review it also gets stored in
    “jos_vm_product.
+/- Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security Please input the anti-spam code that you can read in the image.
 

Go Daddy $7.49 .com Sale!