数据库基础
来源:互联网 发布:php 互换数组里面的值 编辑:程序博客网 时间:2024/05/01 09:12
基本数据类型
- char(n) 定长字符串
- varchar2(n) 变长字符串
- number(m,n) 可变长的数值列
- date 日期类型
表创建
create table 表名(属性列) 例子:
create table department (deptdept_name varchar2(20), building varchar2(15), budget number(12,2), primary key(dept_name));
删除和修改表
删除整个表:drop table<table name>
删除表的内容且保留属性:delete from <table name>
添加属性到表中:
alter table <table name>add <attribute> <data type> [integrity-constraint]
从表中删除属性:
alter table <table name> drop <attribute>
表的基本查询
select A1, A2, ..., Anfrom r1, r2, ..., rmwhere P
natural join
select name, course_idfrom instructor natural join teaches
as
select ID, name, salary/12 as monthly_salaryfrom instructor
0 0
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 数据库基础
- 洛谷 2115
- KafKa数据存储与数据一致性保证
- Java回顾之I/O
- bzoj 1531: [POI2005]Bank notes 单调队列优化多重背包
- 删除vector中内存
- 数据库基础
- 大型网站架构技能图谱-Java版
- 【Linux】mount命令介绍及其使用
- Android中的多媒体音频和视频播放
- HDU 2209 C - 翻纸牌游戏
- Android Camera HAL3中预览preview模式下的控制流
- 十一、SQLite数据库增删改查操作案例
- 用Socket实现PC和手机的文件传输
- Kafka文件存储机制那些事