易截截图软件、单文件、免安装、纯绿色、仅160KB

MySQL中用sql语句插入时期

mysql> create table testdate(
         -> id int not null auto_increment primary key,
         -> time date);
Query OK, 0 rows affected (0.30 sec)
mysql> insert into testdate(time) values('2010-4-23');
Query OK, 1 row affected (0.06 sec)
mysql> select * from testdate;
+----+------------+
| id | time            |
+----+------------+
| 1       | 2010-4-23|
+----+------------+
1 row in set (0.00 sec)
mysql> alter table testdate add column current time;
Query OK, 1 row affected (0.25 sec)
Records: 1      Duplicates: 0      Warnings: 0
mysql> update testdate set current='21:18:00' where id=1;
Query OK, 1 row affected (0.06 sec)
Rows matched: 1      Changed: 1      Warnings: 0
mysql> select * from testdate;
+----+------------+----------+
| id | time           | current      |
+----+------------+----------+
| 1      | 2010-4-23 | 21:18:00 |
+----+------------+----------+
1 row in set (0.00 sec)
mysql> alter table testdate add column combine timestamp;
Query OK, 1 row affected (0.14 sec)
Records: 1     Duplicates: 0     Warnings: 0
mysql> update testdate set combine='20050504212000' where id=1;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1     Changed: 0     Warnings: 0
mysql> select * from testdate;
+----+------------+----------+---------------------+
| id | time          | current     | combine                |
+----+-------


相关文档:

PowerDesigner与SQL Server相连

PowerDesigner与SQL Server相连
以前听说过PowerDesigner可以和数据库连接,根据在PowerDesigner创建的数据模型创建表、触发器、存储过程到数据库中。也可以将已有的数据库导出到PowerDesigner中为数据模型。今天做了一下测试,发现确实很简单,现在操作步骤与大家分享:
0、准备工作
先在SQL Server中创建一数据库, ......

找回MysQL密码

由于前段时间要用powerdesigner设计数据库,可数据库设计好后好导入MysQL时需要ODBC连接,而MysQL5.0以上的均要修改密码(我在网上查过),按他们的意思修改了root密码,结果是直接进不了MysQL了,我那个郁闷,在网上查找资料,也按他们的方法做了,可还是不行(本人对dos不熟)。但最终还是可以了,下面说下具体方法
1、w ......

MySQL性能优化的最佳20+条经验

今天,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显。关于数据库的性能,这并不只是DBA才需要担心的事,而这更是我们程序员需要去关注的事情。当我们去设计数据库表结构,对操作数据库时(尤其是查表时的SQL语句),我们都需要注意数据操作的性能。这里,我们不会讲过多的SQL语句的优化,而只是针 ......

网上找到的SQL库比较语句

以下是第一篇:
/*--比较两个数据库的表结构差异
--*/
/*--调用示例
exec p_comparestructure 'xzkh_model','xzkh_new'
--*/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_comparestructure]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[p_comparestructure ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号