• 数据库表的创建、修改、清空、数据的插入、更新、删除 语句


    --创建表格

    create table test (name varchar2(8), age number(4), job varchar(8) ) ----------------------------------------------------------------------------------------------------------------------------- --修改表格
    alter table test
    --增加一列 add(hiredate date) alter table test --修改数据类型 modify(hiredate varchar(10)) select *from test alter table test -- 删除一列 drop(age) ------------------------------------------------------------------------------------------------------------------------------- --插入数据 insert into test (name,job,hiredate)values ('0000','哈哈','05-01-1998'); insert into test (name,job,hiredate)values ('0001','哈哈1','05-01-1998'); insert into test (name,job,hiredate)values ('0002','哈哈2','05-01-1998'); insert into test (name,job,hiredate)values ('0003','哈哈3','05-01-1998'); insert into test (name,job,hiredate)values ('0004','哈哈4','05-01-1998'); delete test where name='0000'--删除数据 ------------------------------------------------------------------------------------------------------------------------------- --更新数据
    update test
    set name='姓名' where name like '%00%' select *from test truncate table test -- 清空表内数据
    --
    drop table test --删除表
    执行完之后,表将不复存在,只能再次创建新表
  • 相关阅读:
    PHP添加Redis模块及连接
    Redis高级应用
    Redis常用命令
    Redis的数据类型及操作
    Redis下载及安装部署
    NoSQL介绍
    8种Nosql数据库系统对比
    JQ插件
    libcurl一般用法
    密钥对加密原理
  • 原文地址:https://www.cnblogs.com/-strong/p/7195857.html
Copyright © 2020-2023  润新知