
大家好,又见面了,我是你们的朋友全栈君。
1.创建表的语法 create table 表名 (列1 数据类型 1,列2 数据类型) tablespace 表空间
SQL:create table student ( ID NUMBER not null, NAME VARCHAR2(20) ); 表已创建

desc 查看表结构
2. SQL:desc student;

3. alter table student add(系号 NUMBER Not null);

4. 修改列的类型 alter table student modify(dept varchar2(20));

5. 重命名列名称 SQL> alter table student rename column dept to dept01;
6. 删除已有列
alter table student drop column dept;

7. 删除数据表
drop table student;
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/125415.html原文链接:https://javaforall.cn