zoukankan      html  css  js  c++  java
  • mysql

    1.插入多条数据:

    INSERT INTO think_user (user,email,date)
    SELECT '雪莲花开' ,'xuelianflower@qq.com',NOW()
    UNION ALL
    SELECT '青春如此浪荡' ,'youngth@yahu.com',NOW()
    UNION ALL
    SELECT '暖心向阳i' ,'warnheart@sohu.com',NOW()
    UNION ALL
    SELECT '如果没有明天' ,'tommorrow@hotmail.com',NOW()
    UNION ALL
    SELECT '残阳照、墨痕' ,'canyang@gmail.com',NOW()
    UNION ALL
    SELECT '久伴成了酒伴' ,'wine@163.com',NOW()
    UNION ALL
    SELECT '萌神无敌i' ,'mengshen@126.com',NOW();

     批量插入到数据库:

    INSERT INTO sdb_b2c_member_comments ( type_id, object_type, author,comment ) VALUES 
    ( 3184 , 'discuss' , 'member_test9' , 'discuss test 9' ),
    ( 3184 , 'discuss' , 'member_test10' , 'discuss test 10' ),
    ( 3184 , 'discuss' , 'member_test11' , 'discuss test 11' ),
    ( 3184 , 'discuss' , 'member_test12' , 'discuss test 12' ),
    ( 3184 , 'discuss' , 'member_test13' , 'discuss test 13' ),
    ( 3184 , 'discuss' , 'member_test14' , 'discuss test 14' ),
    ( 3184 , 'discuss' , 'member_test15' , 'discuss test 15' );

    2.插入单条数据:

    INSERT INTO users (username,sex,birth) VALUES ('Lee','x',NOW());

  • 相关阅读:
    前端——DOM
    前端——JavaScript
    前端——HTML
    初学Python——协程
    初学Python——进程
    初学Python——线程
    初学Python——Socket网络编程
    初学Python——RabbitMQ的安装
    初学Python——面向对象(二)
    muduo网络库源码学习————线程池实现
  • 原文地址:https://www.cnblogs.com/webskill/p/4850759.html
Copyright © 2011-2022 走看看