- 增
- 刪
- 改
- 查
提交事務(wù)
oracle 默認(rèn)所有操作都是在事務(wù)中,如果要保存操作,需要commit才能生效
commit //非常重要!!!
增加數(shù)據(jù)
insert into "表名" ("列1名","列2名") values ("值1","值2") //如果插入的是所有列,則可以省略`("列1名","列2名")`這部分
日期函數(shù):
to_date('2017-03-14 14:30:40', 'yyyy-mm-dd hh24:mi:ss') //可以轉(zhuǎn)化為數(shù)據(jù)庫能存儲(chǔ)的時(shí)間格式
刪除數(shù)據(jù)
delete from "表名" where 條件語句
改
update "表名" set "列1"="值1","列2"="值2"
查
select * from "表名" where "列1"="值1"
條件語句
where not "條件1" and "條件2" or "條件3"