lijinglj

#关于数据库

#关于数据库知识:

  #数据库
    #增创建数据库
        create database if not exists \'ljk\'
    #查看库列表
        show databases
    #删除数据库
        drop database \'ljk\'
    
  #数据表
    #增创建表
        create table if not exists \'lib\'(\'列名\' 数据类型 )
    #查看某一个库内的表结构
        use 库名
        show tables
    #查看建表语句
        show create table 表名;
    #增加表内列
        alter table 表名 add 列名 数据类型 
    #更改表内列
        alter table 表名 alter column 列表 数据类型    
    #删除数据表
        drop table \'ljb\'

  #表内数据
    #增加数据对于表
        insert into 表名(\'列1\', \'列2\') values(\'值1\', \'值2\')
    #更改表内数据
        updata 表名 set 命令 where 条件
    #查看表中某一数据
        select * from 表名 where 条件
    #删除表内列
        alter table 表名 drop column 列表

 

分类:

技术点:

相关文章:

  • 2022-01-22
  • 2021-09-22
  • 2022-12-23
  • 2021-11-19
  • 2018-11-13
  • 2022-12-23
  • 2021-10-18
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2021-09-22
  • 2021-08-08
  • 2022-01-02
  • 2021-08-16
  • 2021-11-10
  • 2021-06-11
相关资源
相似解决方案