zoukankan      html  css  js  c++  java
  • mysql 语法

                                      -create database database_name; show databases;show tables;
                                     | -create table table_name(column_name1 column_type,column_name2 column_type); desc table_name;
                                     |
                                     | -drop table table_name;
    DDL---------               |-drop -drop database database_name;
    (数据定义语言)              |          
                                     | -alter table table_name ALTER_SPECIFICATION column_name column_definition [first/after column_name];;
                                     |-alter -alter table table_name rename new_table_name;




                                    |-insert -insert into table_name (field1,field2,field3.....) values (value1,value2,value3....)
                                    | -insert into table_name (field1,field2,field3.....) values (record1_value1,record1_value2,...record1_valuen),
                                    | (record2_value1,record2_value2,...record2_valuen);
    DML---------               |-update -update table_name set field1=value1,field2=value2... where condition;
    (数据操作语言)          | -update table_name1,table_name2 set table_name1.field1=expr1,table_name2.field2=expr2 where condition;
                                    |
                                    |-delete -delete from table_name where condition;
                                    | -delete t1,t2...from t1,t2 where condition;
                                    |
                                    |-select -select * from table_name where condition;
                                    | -select * from table_name where condition order by field desc/asc;
                                    | -select * from table_name limit(offset_start,row_count);
                                    | -select field1,field2 fun_name from table_name /where where_contition/group by fieldn/with rollup/having where_contition;
                                    | -select * from t1 union/union all select t2 union/union...;

                             |-grant select,insert on database_name.* to 'user_name'@'localhost' identified by '密码'
            DCL---------|
    (数据控制语言)   |-revoke select,insert on database_name.* to 'user_name'@'localhost';

    如有错误,望费心指出。 感激涕零。
  • 相关阅读:
    mybatis学习$与#号取值区别
    java学习
    mybatis学习
    spring mvc 数据校验(bean实体注解实现)
    maven学习
    java.lang.ClassNotFoundException: org.springframework.web.util.WebAppRootListener
    20180804 excel规划求解。。。
    java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
    mybatis config 配置设置说明
    进程状态以及状态转换
  • 原文地址:https://www.cnblogs.com/zouxiaopq/p/6165822.html
Copyright © 2011-2022 走看看