Search
 
SCRIPT & CODE EXAMPLE
 

SQL

copy one column data to another in sql

#copy one column data to another in sql

Syntax 
UPDATE `table` SET new_column_name = old_column_name;

Example
UPDATE `toppers` SET tpicx = tpic;
Comment

copy data from one table column to another table column in sql

#to copy or update a table column from another table column 
UPDATE table_name1 
    SET column1 = (
        SELECT column2
        FROM table_name2
        WHERE table_name1.id = table_name2.id
    );
Comment

sql query to copy data from one column to another

UPDATE table_name SET
    destination_column_name=orig_column_name
WHERE condition_if_necessary
Comment

PREVIOUS NEXT
Code Example
Sql :: wordpress change user password sql 
Sql :: get the mysql table columns data type mysql 
Sql :: how to select department from table 
Sql :: set permanent SET GLOBAL sql_mode ubuntu 
Sql :: how to check even or odd in sql 
Sql :: postgresql create table with timestamp 
Sql :: oracle nls session 
Sql :: psql human readable 
Sql :: delete all rows from table mysql 
Sql :: how to connect mysql with specify port thorugh cmd 
Sql :: delete all entries postgres 
Sql :: oracle export view ddl 
Sql :: sqlfiddle example tables 
Sql :: user privileges postgresql information_schema 
Sql :: update data with random values postgres 
Sql :: access the postgres psql 
Sql :: oracle add month 
Sql :: sort by last three charecter in sql 
Sql :: tsql replace value in json 
Sql :: mysql sum cast decimal without round 
Sql :: sql convert unix time to date 
Sql :: oracle add column with default value 
Sql :: mysql update set sum 
Sql :: update row in mysql 
Sql :: alter tablespace add datafile 
Sql :: sql ends with string 
Sql :: An error occurred while installing mysql2 (0.5.3) 
Sql :: mysql remove only_full_group_by permanently 
Sql :: create function in postgresql 
Sql :: ORA-00903 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =