mysql语句
sql server 中,添加默认约束 比如 alter table 表名 add constraint 默任约束名 default (getDate()) for 字段 ,在mysql中怎么实现呢??
SQL code:
mysql> create table t_yanyufeng(
-> id int,
-> col timestamp default CURRENT_TIMESTAMP ()
-> );
Query OK, 0 rows affected (0.13 sec)
SQL code:
mysql> alter table t_yanyufeng modify id int default 100;
Query OK, 0 rows affected (0.05 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql>
建议参考一下MYSQL的文档
MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html
非常感谢你!!
相关问答:
我以前安装了一次,后来卸载了,现在再安装的时候,提示错误:Error 1305.Error reading from file C:DOCUME~1\LOCALS~1\Temp\mysql_server.msi.Verify that the file exists and that you can access it.
可是我找 ......
大家好:
我是搞C的, 现在想用C 连接MYSQL,但是怎么也连接不了,我的代码如下:
#include <stdio.h>
#include "C:\Program Files\MySQL\MySQL Server 5.0\include\mysql.h"
......
这个视频讲的很详细, 对新手非常有用, 基本上一看就懂
由于太大了(50m, 我只能上传20m), 我上传不了, 只好贴出下载地址
下载地址: http://ftel1.3800hk.com/0807/080720djxnzj.rar
好东西,下个看看
......
我有两个表.
a表中有积分字段.
b表也有个积分字段.
因为a表和b表属于不同两个平台.
如果做到同步?就是a表修改的时候同时修改b表.同时b表修改的话也修改a表.
表 1
bbs_member ......