• 数据库的基本操作


    数据库的创建:create database database_name;
    
    数据库的查看:show databases;
    
    删除数据库:drop database database_name;
    
    修改数据库:alter database database_name charset utf8
    
    进入数据库:use database_name;
    
    建表:create table table_name(name type tiaojian);
    
    在同一张表中字段名不能相同,宽度和约束条件可选,字段名和类型必须;
    
    查看表名:show tables
    
    查看表中的详细信息:desc table_name             
    
    select查看(select 字段 from table_name)
    
    往表中插入数据:insert into table_name values ();
    
    insert into table_name(ziduan) values(duiying_ziduan)
    
    修改表:
    
    修改表名:alter table table_name rename new_table_name;
    
    增加字段;alter table table_name add ziduanmin;
    
    删除字段:alter table table_name drop ziduanmin;
    
    修改字段:alter table table_name modify ................
    
         alter table table_name change.........
    

      慢查询和sql优化:https://blog.csdn.net/m_nanle_xiaobudiu/article/details/79288257

  • 相关阅读:
    sharepoint_study_10
    sharepoint_study_9
    sharepoint_study_8
    需要经常读的文章(长期更新)
    sharepoint_study_7
    sharepoint_study_目录学习笔记(长期更新)
    windows_study_2
    sharepoint_study_6
    sharepoint_study_5
    sharepoint_study_4
  • 原文地址:https://www.cnblogs.com/52-qq/p/7475142.html
Copyright © 2020-2023  润新知