• mysql的基本操作


    use myblog;
    
    -- show tables;
    
    -- insert into users(username,`password`,realname) values('lisi', '123', '李四');
    
    -- select * from users;
    
    -- select id,username from users;
    
    -- select * from users where username='zhangsan' and `password`='123';
    
    -- select * from users where username<>'zhangsan';
    
    -- select * from users where username='zhangsan' or `password`='123';
    
    -- select * from users where username like '%zhangsan%';
    
    -- select * from users where password like '%1%' order by id desc;
    
    -- update users set realname='李四2' where username='lisi';
    
    -- SET SQL_SAFE_UPDATES = 0;
    
    -- delete from users where username='lisi';
    
    -- insert into blogs(title,content,createtime, author) values('标题B', '内容B', 1611491115270, '李四');
    
    -- select * from blogs;
    
    -- update blogs set author='lisi' where title='标题B';
    
    select version();
  • 相关阅读:
    洛谷 P2958 [USACO09OCT]木瓜的丛林Papaya Jungle
    洛谷 P1400 塔
    10-2 集合之List
    主从数据库
    【单元测试】
    Pen Editor
    appendGrid
    动画
    JavaScript框架设计 第14章 动画引擎
    >>>
  • 原文地址:https://www.cnblogs.com/chenmiaosong/p/14322221.html
Copyright © 2020-2023  润新知