我以前没有用过mysql,好多东西和ms sql不一样,能给出代码吗?谢谢!

解决方案 »

  1.   

    mysql>  create table t1
        -> (no int not null,products_info varchar(10));
    Query OK, 0 rows affected (0.03 sec)
    mysql> select * from t1;
    +----+---------------+
    | no | products_info |
    +----+---------------+
    |  1 | bob01         |
    +----+---------------+
    1 row in set (0.00 sec)mysql>  update t1
        -> set products_info=concat(ucase(left(products_info,3)),'-',right(products_
    info,2));
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
    mysql> select * from t1;
    +----+---------------+
    | no | products_info |
    +----+---------------+
    |  1 | BOB-12        |
    +----+---------------+
    1 row in set (0.00 sec)