查询手册
菜鸟教程
for循环和seq的使用
echo "method 1"
for i in seq 1 10;
doecho $i;
doneecho "method 2"
for i in {1..10}
doecho $i;
doneecho "method 3"
for i in seq 1 2 10;
doecho $i;
done进入目录创建文件重定向内容
cd Test
…
子查询定义:
单上子查询举例: 显示与 员工 关平 同一部门的员工, 但不包括关平
select * from staff where staff.stdepno (select staff.stdepno from staff where stname关平) and staff.stname<> 关平 ;多行子查询举例ÿ…
1. use mysql
2. select host , user from user; 查看用户 与 对应的host
3. 将 host 中是 %的改为 localhost, 酌情也可以其他用户 的host限制为localhost
update user set host "localhost" where user "root" and host "%"
4. …
先索引扫描,再通过ID去取索引中未能提供的数据,即为回表。
建表
mysql> create table T(
id int primary key,
k int not null,
name varchar(16),
index (k))engineInnoDB;如果语句是 select * from T where ID500,即主键查询方式&am…
最小化安装,没有ifconfig默认没法联网
cd /etc/sysconfig/network-scripts/ sudo vi ifcfg-en33 也有可能是其他后缀 找到ONBOOTno service network restart
然后yum install net-tools