您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息

mysql-sample sql_MySQL

2024/4/20 4:57:48发布5次查看
1) show databases;
2) use db; 进入到数据库db
3) select database(); --显示当前数据库
4) select consstr as colname, t.* from tablename t;
5) select a.id,a.valuea, case (b.valueb is null) when 1 then 'z' else b.valueb end from tablea as a left join tableb as b on(id);
6)导入.sql脚本:
在命令行下:mysql -h *** -u *** -p
      进入到mysql,在mysql>命令行下: source  **.sql
7)在mysql中可以让查询结果的每行竖排列,只需要用/g代替查询语句末尾的分号即可。如:
select * from test limit 10 /g
8)show tables like '%name%';
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录