zoukankan      html  css  js  c++  java
  • mySql 的基本操作

    mysql -uroot -p
    root

    show databases;

    use ltcl_net;
    show tables;

    desc tablename; 查看表结构


    create table test (    id int not null,    last_name char(30) not null,    first_name char(30) not null,    primary key (id),    index name (last_name,first_name));name索引是一个对last_name和first_name的索引。索引可以用于为last_name,或者为last_name和first_name在已知范围内指定值的查询。

    create table test
    (
       localt               char(20) not null,
       cd                   char(5) not null,
       snosat               char(2) not null,
       rnorec               char(3) not null,
       id                   INT(20) not null AUTO_INCREMENT,
       primary key (id)
    );

     DROP TABLE test;//删除表

    alter table e_down add soft_version1 varchar(50);//增加字段

    查询数据库中的存储过程
     
    方法一:
           select `name` from mysql.proc where db = 'your_db_name' and `type` = 'PROCEDURE'
     
    方法二:
             show procedure status;

    mysql -uroot -proot -Dxqpd<sql路径 -->导入数据库内容,xqpd为数据库名称,需新建

  • 相关阅读:
    字符串 高精度计算
    JAVA Socket编程 课堂作业
    图论 Floyd算法
    天梯赛题解 L1-049 天梯赛座位分配
    天梯赛题解 -L1-039 古风排版
    HDU 5558 后缀数组
    HDU 6194 后缀数组
    HDU 5769 后缀数组
    HDU 4691 后缀数组+RMQ
    HDU 4135 容斥原理
  • 原文地址:https://www.cnblogs.com/fm168/p/3271931.html
Copyright © 2011-2022 走看看