![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
撒哈拉的绿洲
外面没有别人,只有自己。
展开
-
mysql 的级联操作
1.创建表acreate table a(name char(20) not null,id char(20) not null primary key);2.创建表bcreate table b(b_name char(20) not null,b_id char(20) not null ,constraint foreign key(b_id) refe原创 2014-03-31 23:08:43 · 3111 阅读 · 0 评论 -
sql判断表格存在
sql语句判断表格是否存在,不存在则创建表格:create table if not exists demo(id int(10),name varchar(50));原创 2015-02-26 16:05:54 · 747 阅读 · 0 评论 -
mysql类似oralce里decode的用法
oracle中decode的用法select decode(条件,值1,翻译值1,值2,翻译值2,缺省值) from tableName ;mysql中的用法select case when 条件1 then 翻译值1 when 条件2 then 翻译值2 else 缺省值 from tableName;原创 2015-03-02 14:26:15 · 12651 阅读 · 1 评论