易截截图软件、单文件、免安装、纯绿色、仅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中创建一数据库, ......

Struts+Hibernate+MySql中文乱码解决方案

1、修改MySql数据库的my.ini配置文件、
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If yo ......

Mysql 数据库字符集转换及版本升级/降级的详细教程

看到不少用户反映转换完以后是乱码的情况,出现这种现象的主要原因是这类用户使用的都是mysql4.1以上的版本.下面作一个说明,希望出现这个问题的朋友都能耐心的把这个文档看完!!!
MySQL 4.1开始,对多语言的支持有了很大变化 (这导致了问题的出现)。尽管大部分的地方 (包括个人使用和主机提供商),MySQL 3、4.0 仍然占主导地 ......

深入研究Mysql字符集设置以及排序方式

根据Chaos Wang的PPT整理而成, 在此再次感谢Chaos Wang的此次TechTalk
基本概念
• 字符(Character)是指人类语言中最小的表义符号。例如'A'、'B'等;
• 给定一系列字符,对每个字符赋予一个数值,用数值来代表对应的字符,这一数值就是字符的编码(Encoding)。例如,我们给字符'A'赋予数值0,给字符'B'赋予数值 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号