上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 68 下一页
摘要: mysql> select * from user; +------+----------+-----------+ | id | name | address | +------+----------+-----------+ | 1 | xiaoming | beijing | | 2 | xiaobai | shandong | | 3 | x... 阅读全文
posted @ 2019-08-07 02:06 anobscureretreat 阅读(167) 评论(0) 推荐(0)
摘要: mysql> select * from test -> ; +----+------------+-------+-----------+ | id | name | score | subject | +----+------------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | ... 阅读全文
posted @ 2019-08-07 01:55 anobscureretreat 阅读(234) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+------------+-------+-----------+ | id | name | score | subject | +----+------------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xia... 阅读全文
posted @ 2019-08-07 01:30 anobscureretreat 阅读(287) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+------------+-------+-----------+ | id | name | score | subject | +----+------------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xia... 阅读全文
posted @ 2019-08-07 00:00 anobscureretreat 阅读(172) 评论(0) 推荐(0)
摘要: mysql> select * from user; +------+----------+-----------+ | id | name | address | +------+----------+-----------+ | 1 | xiaoming | beijing | | 2 | xiaobai | shandong | | 3 | x... 阅读全文
posted @ 2019-08-06 23:38 anobscureretreat 阅读(188) 评论(0) 推荐(0)
摘要: mysql> select * from user; +------+----------+-----------+ | id | name | address | +------+----------+-----------+ | 1 | xiaoming | beijing | | 2 | xiaobai | shandong | | 3 | x... 阅读全文
posted @ 2019-08-06 15:46 anobscureretreat 阅读(198) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+------------+-------+-----------+ | id | name | score | subject | +----+------------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xia... 阅读全文
posted @ 2019-08-06 14:44 anobscureretreat 阅读(195) 评论(0) 推荐(0)
摘要: mysql> select rtrim(" cdcdcd "); +--------------------+ | rtrim(" cdcdcd ") | +--------------------+ | cdcdcd | +--------------------+ 1 row in set (0.00 sec) 阅读全文
posted @ 2019-08-06 12:52 anobscureretreat 阅读(1128) 评论(0) 推荐(0)
摘要: mysql> select upper(" cdcdcd"); +------------------+ | upper(" cdcdcd") | +------------------+ | CDCDCD | +------------------+ 1 row in set (0.00 sec) 阅读全文
posted @ 2019-08-06 12:48 anobscureretreat 阅读(1717) 评论(0) 推荐(0)
摘要: mysql> select right(" dedede",6); +---------------------+ | right(" dedede",6) | +---------------------+ | dedede | +---------------------+ 1 row in set (0.00 sec) mysql> select rig... 阅读全文
posted @ 2019-08-06 12:47 anobscureretreat 阅读(1946) 评论(0) 推荐(0)
摘要: mysql> select " DFREF"; +--------+ | DFREF | +--------+ | DFREF | +--------+ 1 row in set (0.00 sec) mysql> select lower(" DFREF"); +-----------------+ | lower(" DFREF") | +-----------------+ | ... 阅读全文
posted @ 2019-08-06 12:17 anobscureretreat 阅读(3780) 评论(0) 推荐(0)
摘要: mysql> select " dedede"; +----------+ | dedede | +----------+ | dedede | +----------+ 1 row in set (0.00 sec) mysql> select ltrim(" dedede"); +-------------------+ | ltrim(" dedede") | +-... 阅读全文
posted @ 2019-08-06 12:00 anobscureretreat 阅读(1590) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+------------+-------+-----------+ | id | name | score | subject | +----+------------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xia... 阅读全文
posted @ 2019-08-06 11:42 anobscureretreat 阅读(3853) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+------------+-------+-----------+ | id | name | score | subject | +----+------------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xia... 阅读全文
posted @ 2019-08-06 11:26 anobscureretreat 阅读(2044) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+------------+-------+-----------+ | id | name | score | subject | +----+------------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xia... 阅读全文
posted @ 2019-08-06 11:12 anobscureretreat 阅读(601) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+------------+-------+-----------+ | id | name | score | subject | +----+------------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xia... 阅读全文
posted @ 2019-08-06 10:59 anobscureretreat 阅读(1667) 评论(0) 推荐(0)
摘要: 字符类 [:alnum:]=[a-zA-Z0-9] [:alpha:]=[a-zA-Z] [:digit:]=[0-9] [:lower:]=[a-z] [:upper:]=[A-Z] [:xdigit:]=[a-fA-F0-9] 重复元字符 * = >=0 + = >=1 = {1,} ? = {0,1} {n} 指定数目 {n,} = >=n {n,m} = >=n... 阅读全文
posted @ 2019-08-06 01:55 anobscureretreat 阅读(651) 评论(0) 推荐(0)
摘要: mysql> select concat(name,"**",id) as test from test; +----------------+ | test | +----------------+ | xiaoming**1 | | xiaohong**2 | | xiaohong**3 | | xiaohong**4 | | xiaohong... 阅读全文
posted @ 2019-08-06 01:40 anobscureretreat 阅读(1038) 评论(0) 推荐(0)
摘要: mysql> select " ddd dddee "; +--------------+ | ddd dddee | +--------------+ | ddd dddee | +--------------+ 1 row in set (0.00 sec) mysql> select rtrim(" ddd dddee "); +------------------... 阅读全文
posted @ 2019-08-06 01:33 anobscureretreat 阅读(5844) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+----------+-------+-----------+ | id | name | score | subject | +----+----------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xiaohong | ... 阅读全文
posted @ 2019-08-06 00:54 anobscureretreat 阅读(457) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+----------+-------+-----------+ | id | name | score | subject | +----+----------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xiaohong | ... 阅读全文
posted @ 2019-08-06 00:44 anobscureretreat 阅读(586) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+----------+-------+-----------+ | id | name | score | subject | +----+----------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xiaohong | ... 阅读全文
posted @ 2019-08-06 00:14 anobscureretreat 阅读(172) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+----------+-------+-----------+ | id | name | score | subject | +----+----------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xiaohong | ... 阅读全文
posted @ 2019-08-05 22:40 anobscureretreat 阅读(281) 评论(0) 推荐(0)
摘要: 成绩最高 成绩最低 阅读全文
posted @ 2019-08-05 22:03 anobscureretreat 阅读(2069) 评论(0) 推荐(1)
摘要: mysql> select * from test; +----+----------+-------+-----------+ | id | name | score | subject | +----+----------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xiaohong | ... 阅读全文
posted @ 2019-08-05 21:38 anobscureretreat 阅读(720) 评论(0) 推荐(0)
摘要: mysql> select * from test; +----+----------+-------+-----------+ | id | name | score | subject | +----+----------+-------+-----------+ | 1 | xiaoming | 89 | shuxue | | 2 | xiaohong | ... 阅读全文
posted @ 2019-08-05 21:33 anobscureretreat 阅读(2695) 评论(0) 推荐(0)
摘要: 16进制转8进制 8进制数转换为10进制数 8进制数转换为16进制数 https://www.runoob.com/php/func-math-base-convert.html 阅读全文
posted @ 2019-08-05 19:50 anobscureretreat 阅读(267) 评论(0) 推荐(0)
摘要: 我们仅在第一次调用 strtok() 函数时使用了 string 参数。在首次调用后,该函数仅需要 split 参数,这是因为它清楚自己在当前字符串中所在的位置。 如需分割一个新的字符串,请再次调用带 string 参数的 strtok() 参考: https://www.w3school.com. 阅读全文
posted @ 2019-08-05 19:25 anobscureretreat 阅读(163) 评论(0) 推荐(0)
摘要: %匹配任意长度 _ 匹配单个字符 阅读全文
posted @ 2019-08-05 01:04 anobscureretreat 阅读(687) 评论(0) 推荐(0)
摘要: mysql> select * from table1; +----------+------------+-----+---------------------+-------+ | name_new | transactor | pid | order_date | price | +----------+------------+-----+-------------... 阅读全文
posted @ 2019-08-04 23:45 anobscureretreat 阅读(472) 评论(0) 推荐(0)
摘要: 假设id为主键,id可以保证字段数据唯一性,但是一张表只有一个主键。主键的值:修改成的0,可以存在,就是排个序。新添加的0,不允许存在,要根据行号改变。本身存在的0,不允许存在,要从1开始递增变化。Insert 进去 id = 0的数据,数据会从实际的行数开始增加 参考: https://www.c 阅读全文
posted @ 2019-08-04 23:27 anobscureretreat 阅读(5270) 评论(0) 推荐(0)
摘要: 唯一键特点: 1、唯一键在一张表中可以有多个。 2、唯一键允许字段数据为NULL,NULL可以有多个(NULL不参与比较) //一个表中允许存在多个唯一键,唯一键允许为空,在不为空的情况下,不允许重复 //设置一个字段为唯一键 mysql> alter table `table1` add unique ( `name_new`); Query OK, 0 rows affected (0.0... 阅读全文
posted @ 2019-08-04 23:25 anobscureretreat 阅读(1528) 评论(0) 推荐(0)
摘要: //不允许为null alter table table1 change id id int(10) not null; //允许为null alter table table1 change id id int(10) null; //name_new允许为空 insert table1(id,transactor) values(1,"world"); //transactor... 阅读全文
posted @ 2019-08-04 23:21 anobscureretreat 阅读(8466) 评论(0) 推荐(0)
摘要: mysql> alter table table1 add price int(10) not null; Query OK, 0 rows affected (0.05 sec) Records: 0 Duplicates: 0 Warnings: 0 //删除一个字段 ALTER TABLE table1 drop id; 阅读全文
posted @ 2019-08-04 23:20 anobscureretreat 阅读(380) 评论(0) 推荐(0)
摘要: //修改字段长度 alter table table1 modify name char(15); //修改字段名称以及长度 alter table table1 change name name_new char(32); alter table table1 change id id int(10); 阅读全文
posted @ 2019-08-04 23:18 anobscureretreat 阅读(8136) 评论(0) 推荐(0)
摘要: //重命名表 rename table table1 to table2; //重命名多个表 rename table table1 to table2,table3 to table4,table5 to table6; 阅读全文
posted @ 2019-08-04 23:16 anobscureretreat 阅读(534) 评论(0) 推荐(0)
摘要: //创建数据库 create database testdata; //切换数据库 use testdata; //创建表 create table table1(id int,name varchar(10)); //插入值 insert table1(id,name) values(1,"xiaoming"); 阅读全文
posted @ 2019-08-04 23:15 anobscureretreat 阅读(176) 评论(0) 推荐(0)
摘要: //offset参数指定要返回的第一行的偏移量。第一行的偏移量为0,第二行的偏移量为1。count指定要返回的最大行数。LIMIT offset,count; 阅读全文
posted @ 2019-08-04 23:08 anobscureretreat 阅读(158) 评论(0) 推荐(0)
摘要: 例子 例子 例子 阅读全文
posted @ 2019-08-04 22:55 anobscureretreat 阅读(690) 评论(0) 推荐(0)
摘要: 默认不指定,order by 按照升序排列。 asc:升序 desc:降序 阅读全文
posted @ 2019-08-04 22:46 anobscureretreat 阅读(2492) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 68 下一页