mysql 数码

多个表存在一个数据库里  table and database

多个数据库存在一个数据服务器里 database and server

查表 先进库  Use database 

认识sql structured Query language   结构化查询语言   是what 语言不是 howyuyan 

how ---告诉怎么做

what ---想要什么

dml ---数据操作语言--增删改查 使用者角度

ddl -数据定义语言---建设者的角度 比如建表建库等

dcl --数据控制语言--管理员角度

 #select goods_id,goods_name,shop_price
#from goods
#where shop_price>=100 and shop_price<=500;
#SELECT goods_name from goods
#where cat_id=3 and shop_price<1000 or shop_price>3000  and click_count>5;
#substring(参数,第几个) 截取字符串  concat('需要组合的字符串前',组合后)
select goods_id,concat('htc',substring(goods_name,4))
from goods
where goods_name like '%诺基亚%';

posted @ 2017-09-23 22:55  王者之笔  阅读(117)  评论(0编辑  收藏  举报