上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 from sqlalchemy.ext.declarative import declarative_base 4 from sqlalchemy import Column, Integer, S 阅读全文
posted @ 2017-02-16 14:08 200ML 阅读(222) 评论(0) 推荐(0) 编辑
摘要: index 索引(普通索引创建) 例 show index from 表 (查看表的索引) 例 create index 索引名 on 表(列名) (创建普通索引) 例 drop 索引名 on 表;(删除普通索引) create table in1( nid int not null auto_in 阅读全文
posted @ 2017-02-15 15:34 200ML 阅读(154) 评论(0) 推荐(0) 编辑
摘要: delimiter \\ create PROCEDURE p1( OUT p_return_code tinyint ) BEGIN DECLARE exit handler for sqlexception BEGIN -- ERROR set p_return_code = 1; rollback; END; DECLARE... 阅读全文
posted @ 2017-02-15 11:44 200ML 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1 Mysql基本操作 2 3 desc 降序 4 5 例 desc 表 (查看表的描述) 6 例 show create table 表(查看表怎么创建的) 7 例 show index from 表 (查看表的索引) 8 例 set profiling = 1; SQL 执行语句 show pr 阅读全文
posted @ 2017-02-15 11:07 200ML 阅读(178) 评论(0) 推荐(0) 编辑
摘要: prepare 准备 using 使用 deallocate 释放 execute 执行 delimiter $ drop procedure if exists proc $ create procedure proc() begin declare p1 int; set p1 = 11; se 阅读全文
posted @ 2017-02-15 10:05 200ML 阅读(753) 评论(0) 推荐(0) 编辑
摘要: delimiter $ drop function if exists f1 $ mysql> create function f1(l1 int,l2 int) returns int begin declare mun int; set mun = l1 + l2; return(mun); e 阅读全文
posted @ 2017-02-14 17:48 200ML 阅读(121) 评论(0) 推荐(0) 编辑
摘要: delimiter $ drop trigger if exists insert_color $ create trigger insert_color before insert on color for each row begin insert into co(cols) values(ne 阅读全文
posted @ 2017-02-14 16:27 200ML 阅读(110) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- import pymysql import time # 创建连接 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='', db='log') # 创建游标 设置光标用字典的格式获取 默认... 阅读全文
posted @ 2017-02-14 14:45 200ML 阅读(164) 评论(0) 推荐(0) 编辑
摘要: procedures 程序 exists 存在 declare 声明 default 默认 delimiter 定界符 向服务器说明以什么结束 begin 开始 then 然后 delimiter $ create procedure ttww() begin declare d1 int defa 阅读全文
posted @ 2017-02-14 11:33 200ML 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-02-14 09:47 200ML 阅读(94) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页