上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页
摘要: mysql> grant select,insert on sakila.* to 'zl'@'localhost' identified by '123'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> exit Bye [root@localhost ~]# mysql -uzl -p123 mysql: [Warning] ... 阅读全文
posted @ 2019-01-11 14:38 裸奔的小鸵鸟 阅读(172) 评论(0) 推荐(0) 编辑
摘要: #子查询-某些情况下,当进行查询的时候,需要的条件是另外一个select语句的结果,这个时候就要用到子查询。用于子查询的关键字主要包括: in、not in、=、!=、exists、not exists等等。 #从emp表中查询出所有部门在dept表中的所有记录 mysql> select * from dept; +--------+----------+ | deptno | deptna... 阅读全文
posted @ 2019-01-11 11:07 裸奔的小鸵鸟 阅读(250) 评论(0) 推荐(0) 编辑
摘要: #子查询-某些情况下,当进行查询的时候,需要的条件是另外一个select语句的结果,这个时候就要用到子查询。用于子查询的关键字主要包括: in、not in、=、!=、exists、not exists等等。 #从emp表中查询出所有部门在dept表中的所有记录 mysql> select * from dept; +--------+----------+ | deptno | deptna... 阅读全文
posted @ 2019-01-11 10:28 裸奔的小鸵鸟 阅读(329) 评论(0) 推荐(0) 编辑
摘要: #插入 mysql> insert into emp values('zzx1','2002-03-09','2009-04-03','2001',3,22); Query OK, 1 row affected (0.00 sec) mysql> insert into emp values('ttx2','20023-04-10','2010-03-04','2002',4... 阅读全文
posted @ 2019-01-11 09:55 裸奔的小鸵鸟 阅读(175) 评论(0) 推荐(0) 编辑
摘要: mysql> use test; Database changed mysql> create table emp(ename varchar(10),hirdate date,sal decimal(10,2),deptno int(2)); Query OK, 0 rows affected (0.01 sec) mysql> show tables; +----------------+... 阅读全文
posted @ 2019-01-10 16:16 裸奔的小鸵鸟 阅读(134) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash echo "前进程号:"$$ echo "start" sleep 10 kill $$ sleep 900000000 echo "end" [root@weekend110 shell]# cat for.sh #!/bin/bash for ((i=0;i<10;i++ 阅读全文
posted @ 2019-01-10 15:35 裸奔的小鸵鸟 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 官网地址 https://dev.mysql.com/downloads/mysql/ 1. 安装依赖 yum install -y cmake make gcc gcc-c++ libaio ncurses ncurses-devel cd /usr/local/src wget https://cdn.mysql.com//Downloads/MySQL-5.7/... 阅读全文
posted @ 2019-01-10 15:21 裸奔的小鸵鸟 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 现在来设计一个能描述“图书”与“作者”的关系的表结构,需求是 此时你会发现,用之前学的外键好像没办法实现上面的需求了,因为 当然你更不可以像下面这样干,因为这样就你就相当于有多条书的记录了,太low b了,改书名还得都改。。。 那怎么办呢? 此时,我们可以再搞出一张中间表,就可以了 这样就相当于通过 阅读全文
posted @ 2019-01-08 20:07 裸奔的小鸵鸟 阅读(2310) 评论(0) 推荐(0) 编辑
摘要: #-*-coding:utf-8-*- #__author__ = "logan.xu" import sqlalchemy from sqlalchemy import create_engine,func from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column,Intege... 阅读全文
posted @ 2019-01-08 19:17 裸奔的小鸵鸟 阅读(391) 评论(0) 推荐(0) 编辑
摘要: #-*-coding:utf-8-*- #__author__ = "logan.xu" import sqlalchemy from sqlalchemy import create_engine,func from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column,Intege... 阅读全文
posted @ 2019-01-08 18:34 裸奔的小鸵鸟 阅读(478) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页