2010年9月10号上午:
来源:互联网 发布:爱剪辑for mac版 编辑:程序博客网 时间:2024/04/26 14:43
练习:
对于数据记录操作的命令是:delete,insert,update
对于数据字段操作的命令是:drop,alter,create
1,创建数据库:
create database demo;
2,创建数据表:
create table student
(
id int primary key,
name varchar(10),
age int,
sex bit
)
3,删除数据表:
drop table teacher;
4,删除数据库:
drop database demo;
5,插入记录:
insert into student(id,name,age,sex) values(2,'wangwu',10,1)
6, 修改记录:
update student set age=22 where name='wangwu';
7,删除记录:
delete student where id=1;
8,查询记录:
select id,name,age,sex from student;
9,按条件查询,例如:
select id,name,age,sex from student where name='wangwu';
逻辑查询:
select id,name,age,sex from student where name like'wan%';
10, 添加字段:
alter table student add idd int;
11,删除字段:
alter table student drop column idd;
12,修改字段:
alter table student
alter column name varchar(20);
13,使用Top关键字:
select top(1) * from student where name='wangwu';
表示选择姓名为wangwu的同学的前一行记录。
- 2010年9月10号上午:
- 11月9号上午矩阵论课总结
- 2010年11月软件设计师考试上午题解析
- 2013年6月17日上午10时许
- 2016年10月22日上午图片加载
- 2011年06月21日上午
- 2014年12月11日上午
- 上午办离职,下午办入职,明天上班,马不停蹄。 --记2008年9月1日转职
- 2009年10月23日上午所做的事
- 12月5号上午完成事务管理页面部分功能
- 2007年2月26日上午的学习
- 2005年5月软件评测师上午试题
- 2010年11月(下半年)计算机技术与软件专业技术资格(水平)考试 软件设计师 答案(上午卷)
- \t\t本博 数据分析 谢谢大家的捧场 统计时间:2010年12月3日上午
- 07年NOIp模拟赛by Matrix67 定于10月5日上午8:30-11:30进行
- 2010年系统架构师上午题
- 2010年程序员上半年上午试题
- 2010年程序员下半年上午试题
- Transfer file over FTP (close ui and get return code)
- 去掉List 在MyEclipse中的Warning 警号
- Oracle 数据文件大小问题!
- GCC-3.4.6源代码学习笔记 (100 续)
- VC 常用技巧总结 - 108条(转http://www.cctry.com/thread-258-1-1.html)
- 2010年9月10号上午:
- 花生壳实现APACHE(PHP)多端口、远程桌面、SVN、FTP等
- PHP date()函数参数详解
- android Makefile
- Studying note of GCC-3.4.6 source (100 continue)
- CDN技术原理
- heritrix-1.14.4 配置
- Web2.0必读的24部经典专著
- Android 的用户层 uevent处理机制