zoukankan      html  css  js  c++  java
  • mysql

    step1.    /etc/init.d/mysqld restart

    step2.   alter table tb1 add mycol INTEGER UNSIGNED;

    查询数据库中的存储过程和函数

    方法一:

           select `name` from mysql.proc where db = 'your_db_name' and `type` = 'PROCEDURE'   //存储过程
           select `name` from mysql.proc where db = 'your_db_name' and `type` = 'FUNCTION'   //函数

    方法二:

             show procedure status; //存储过程

            show function status;     //函数

    查看存储过程或函数的创建代码

    show create procedure proc_name;
    show create function func_name;

    查看视图

    SELECT * from information_schema.VIEWS   //视图

    SELECT * from information_schema.TABLES   //表

    查看触发器

    方法一:
    语法:SHOW TRIGGERS [FROM db_name] [LIKE expr]
    实例:SHOW TRIGGERS\G     //触发器

    方法二:
    对INFORMATION_SCHEMA数据库中的TRIGGERS表查询

    mysql>SELECT * FROM triggers T WHERE trigger_name=”mytrigger” \G 

    linux插入时间 

    把int转 timestamp

    使用

    From_unixtime(%d),其中%d表示你数字的时间

  • 相关阅读:
    第一周学习进度
    四则运算
    添加课程
    继承和多态的动手动脑
    String 方法
    【CoreData】分页查询和模糊查询
    【CoreData】表之间的关联
    代码创建storyboard
    UIWindows 使用注意
    UIApplicationDelegate
  • 原文地址:https://www.cnblogs.com/xianqingzh/p/1787130.html
Copyright © 2011-2022 走看看