mysql change all values in a column

后端 未结 4 1160
执念已碎
执念已碎 2021-01-01 10:25

I want to change all values in the tablecolumn \"Quellendatum\".

When the row-value is 2005-06-20 then it should be replaced with 2012-06-20. When the row-value is N

相关标签:
4条回答
  • 2021-01-01 10:51

    In MySql you can do:

    UPDATE TABLENAME    
    SET IDCOLUMN=VALUE    
    WHERE IDCOLUMN=VALUE    
    AND !isnull (IDCOLUMN)
    
    0 讨论(0)
  • 2021-01-01 11:01

    How about:

    UPDATE outgoing2.tbl_hochschule 
    SET Quellendatum = '2012-06-20' 
    WHERE Quellendatum = '2005-06-20' 
    AND !isnull( Quellendatum );
    
    0 讨论(0)
  • 2021-01-01 11:04

    it should be :

    UPDATE tablename 
    SET Quellendatum = '2012-06-20' 
    WHERE Quellendatum = '2005-06-20'
    
    0 讨论(0)
  • 2021-01-01 11:11
    UPDATE outgoing2.tbl_hochschule 
    SET Quellendatum = '2012-06-20' 
    WHERE Quellendatum <> '' AND Quellendatum <> NULL;
    
    0 讨论(0)
提交回复
热议问题