历经8个月的痛苦煎熬,终于在深圳找到一份测试工作了!
努力学习测试相关知识,尽快让自己充实起来,让工作处于轻松愉快的状态!
数据库必会查询语句
上一篇 /
下一篇 2010-05-18 15:22:41
/ 个人分类:测试技术
1.查询表中记录: select * from tablename;
2.更改表中特定的一条记录: update tablename set 字段名='...' where 字段名='...';
3.删除表中特定的一条记录: delete from tablename where 字段名='...';
4.删除表中所有记录: delete from tablename;
5.给表插入数据: insert into tablename values();
6.给表改名: alter table oldtablename rename to newtablename;
举例:
表名为system_config,字段分别是Name|Value|Description,其中一条记录为:Proc_Quit_Time|5|Process quit assigned time
1.查询表中数据: select * from system_config;
2.更改表中特定的一条记录: update system_config set Value='4' where Name='Proc_Quit_Time';
3.删除表中特定的一条记录: delete from system_config where Name='Proc_Quit_Time';
4.删除表中所有数据: delete from system_config;
5.给表插入数据: insert into system_config values('Proc_Quit_Time',5,'Process quit assigned time');
6.给表改名: alter table system_config rename to system_conf;
收藏
举报
TAG: