几个常用的sql语句(续)
来源:互联网 发布:努比亚z17 预装软件 编辑:程序博客网 时间:2024/05/16 15:55
1.delete from project where name is null and description is null;
//is null example
2.alter table user add column ip varchar(15) after last_name;
//add column example
3.alter table project add column user_id int after project_id;
4.alter table project add constraint FK_project_ref_user foreign key (user_id)
references user (user_id) on delete restrict on update restrict;
//add foreign key by powerdesigner
5.insert into modify_log_type values(11, 40, 'Meeting', NOW(),NOW(),0);
//using now():current time
6.update modify_log set plan_time=plan_time*60;
// change plan_time(hours) into minutes.
(Here,we will notice that if plan_time is 2.5hours, it will be changed 150minutes. that's right!!!)
7.alter table user modify password varchar(50);
//"modify" key is used to change column type.
("change" key has also the same function , and it can change column name. see sql manual.)
8.update modify_log set finish_time=replace(finish_time, ':', ':');
//replace function
(Here, we can replace Chinese colon with english colon)
好,先总结到这儿!
- 几个常用的sql语句(续)
- SQL语句的几个常用函数
- oracle数据库的几个常用的SQL 语句
- 整理出的数据库中几个常用sql查询语句
- sql语句中几个不常用的查询通配符
- MySQL最常用的几个基本SQL语句
- oracle 中几个常用sql语句
- 几个精彩的SQL语句
- 几个基础的SQL语句
- 几个sql语句的介绍
- 有用的几个sql语句
- 常用的SQL语句
- 常用的SQL语句
- 常用的SQL语句
- 常用的SQL语句
- 常用的SQL语句
- SQL语句常用的
- 常用的sql语句
- 母版页与内容页合并后事件的发生顺序
- chrome 和 csdn 之间的另一个问题
- VS2005快捷方式
- 奥巴马当选美国总统演讲全文(最完整最清晰演讲视频) Yes,We can!
- 触动
- 几个常用的sql语句(续)
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法
- VS2005制作安装包的“系统必备”选项
- c# 引用类型和值类型
- 好书推荐(持续更新ing)
- Java同步技术(七)
- 金融危机下就是现金为王
- Mime-type
- 增加下拉菜单的代码