SQL表的最基本操作练习
2024-10-01 22:12:49
use test
go
--select * from stu2
drop table stu2--删除表
go
create table stu2 --新建一个名为stu2表
(
id int primary key,
name char(20) not null,
sex char(10) not null
)
--创建完的修改操作
alter table stu2 add age int --添加列
alter table stu2 add grade int
alter table stu2 add teacher int alter table stu2 alter column teacher char(20)--修改列数据类型 alter table stu2 drop column sex --删除列
最新文章
- C#的Socket实现UDP协议通信
- Python之路----------迭代器
- tomcat + apache +jkmod 配置php,jsp共存
- 通过 Session 操纵对象
- TP5学习基础二:目录结构、URL路由、数据操作
- Spring详解(七)------事务管理
- 关于字符型char变量
- JS随机数不重复
- Centos6.4 + mysql-5.6.38-linux-glibc2.12-x86_64.tar 实现mysql主从复制
- Hadoop伪分布式的搭建
- WebForm文件上传
- codeforces 242E - XOR on Segment (线段树 按位数建树)
- 子串 [NOIP2015]
- Hive之分区(Partitions)和桶(Buckets)
- MYSQL 中的日期操作(不包含跨年问题)
- 【原创】查询某个SQL在Oracle的会话
- 八皇后II
- 第四章 mybatis批量insert
- Eclipse——工作台
- Mac上安装第三方应用显示包资源破坏解决办法