MySql
文章平均质量分 68
codema
这个作者很懒,什么都没留下…
展开
-
sqlzoo习题答案-Select within Select Tutorial
8.List each continent and the name of the country that comes first alphabetically.select continent,min(name)from worldgroup by continentorder by continent*******方法二*******原创 2018-06-22 10:30:50 · 673 阅读 · 0 评论 -
sqlzoo习题答案--Using Null
5.Use COALESCE to print the mobile number. Use the number '07986 444 2266' if there is no number given.Show teacher name and mobile number or '07986 444 2266'select name,coalesce(mobile,'07986 444 226...原创 2018-06-22 10:48:51 · 454 阅读 · 0 评论 -
mysql学习网站链接
1.W3School: http://www.w3school.com.cn/sql/index.asp2.sql练习:http://sqlzoo.net原创 2018-06-24 10:38:00 · 648 阅读 · 0 评论 -
sqlzoo习题答案--More JOIN operations
This tutorial introduces the notion of a join. The databaseconsists of three tables movie , actor and casting .movieidtitleyrdirectorbudgetgrossactoridnamecastingmovieidactoridord<原创 2018-06-24 17:12:04 · 514 阅读 · 0 评论 -
sqlzoo习题答案--The join operation
sqlzoo地址:http://sqlzoo.net/wiki1.The join operation(8).show the name of all players who scored a goal against Germany.HINTSelect goals scored only by non-German players in matches where GER was the id...原创 2018-06-16 19:51:06 · 1092 阅读 · 0 评论 -
数据库中Schema(模式)概念的理解
摘自:https://www.cnblogs.com/csniper/p/5509620.html在学习SQL的过程中,会遇到一个让你迷糊的Schema的概念。实际上,schema就是数据库对象的集合,这个集合包含了各种对象如:表、视图、存储过程、索引等。为了区分不同的集合,就需要给不同的集合起不同的名字,默认情况下一个用户对应一个集合,用户的schema名等于用户名,并作为该用户缺省schema...转载 2018-07-02 09:01:53 · 1249 阅读 · 0 评论 -
sqlzoo习题答案--Self join
Details of the database Looking at the dataDetails of the database Looking at the datastops(id, name)route(num,company,pos, stop) stopsrouteidnumnamecompany pos stop原创 2018-06-28 10:01:00 · 988 阅读 · 0 评论 -
常见的SQL笔试题和面试题(上):经典50题
https://zhuanlan.zhihu.com/p/38354000常见的SQL笔试题和面试题(上):经典50题已知有如下4张表:学生表:STUDENT(S#,SNAME,SAGE,SSEX)课程表:COURSE(C#,CNAME,T#)成绩表:SC(S#,C#,SCORE)教师表:TEACHER(T#,TNAME)其中,1)学生表里的字段含义:S#代表学号,SNAME代表学生姓名,SAGE...原创 2018-07-04 17:09:43 · 193086 阅读 · 22 评论 -
Mysql增加主键或者更改表的列为主键的sql语句
参考博客:https://www.cnblogs.com/besty/p/3917592.html添加表字段alter table table1 add transactor varchar(10) not Null;alter table table1 add id int unsigned not Null auto_increment primary key修改某个表的字段类型及指定为空...转载 2018-07-05 11:24:27 · 5010 阅读 · 0 评论