zoukankan      html  css  js  c++  java
  • mysql 建表语句

     修改id为自动增长: alter table book b_ISBN int(11) auto_increment;

      自动增长要加的:auto_increment

    基本的sql语句:

    1. 选择:select * from table where 范围

    2.  插入:insert into table(field1,field2) values(value1,value2)
    3.  删除:delete from table where 范围
    4.  更新:update table set field1=value1 where 范围
    5.  查找:select * from table where field1 like ’%value1%’
    6.  排序:select * from table order by field1,field2 [desc]
    7. 修改id为自动增长 alter table book b_ISBN int(11) auto_increment
    8. 总数:select count as totalcount from table 
    9. 求和:select sum(field1) as sumvalue from table
    10. 平均:select avg(field1) as avgvalue from table
    11. 最大:select max(field1) as maxvalue from table
    12. 最小:select min(field1) as minvalue from table
  • 相关阅读:
    46. 全排列
    90. 子集 II
    289. 生命游戏
    844. 比较含退格的字符串
    1266. 访问所有点的最小时间
    707. 设计链表
    DOM 关于dom的
    插件库
    浏览器判断
    FTP 客户端安装
  • 原文地址:https://www.cnblogs.com/nucdy/p/5003106.html
Copyright © 2011-2022 走看看