zoukankan      html  css  js  c++  java
  • 数据库表的创建、修改、清空、数据的插入、更新、删除 语句

    --创建表格

    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 --删除表
    执行完之后,表将不复存在,只能再次创建新表
  • 相关阅读:
    Python数据类型之数值-Python基础前传(5)
    R语言之数据可视化
    R语言之数据可视化
    R语言基础
    R语言基础
    R语言基础
    R语言入门
    R语言入门
    用 python 爬取 gutenberg 上的英文科幻小说
    Python 在数据科学中的应用
  • 原文地址:https://www.cnblogs.com/-strong/p/7195857.html
Copyright © 2011-2022 走看看