当前位置: 首页 > news >正文

新做的网站如何网络营销swot分析

新做的网站如何,网络营销swot分析,android购物商城源码,深圳市手机网站建设公司文章目录 一、函数1、ifnull2、if3、case4、exists 存在5、字符串函数(重点)6、数学函数7、日期函数 二、TCL语句1、创建用户2、赋予权限3、修改mysql允许远程登录 一、函数 1、ifnull 当前⾯的值是null的时候,使⽤后⾯的默认值 ifnull(字段…

文章目录

  • 一、函数
    • 1、ifnull
    • 2、if
    • 3、case
    • 4、exists 存在
    • 5、字符串函数(重点)
    • 6、数学函数
    • 7、日期函数
  • 二、TCL语句
    • 1、创建用户
    • 2、赋予权限
    • 3、修改mysql允许远程登录


一、函数

1、ifnull

当前⾯的值是null的时候,使⽤后⾯的默认值
ifnull(字段,默认值) – 参数就是两个,第一个参数需要判断的字段,第二个是默认值

2、if

if(条件,值1,值2) – 前⾯的条件如果成⽴,取值第⼀个,否则取值第⼆个

3、case

case when … then … else … end

-- 行转列
select sname,sum(case  when subject='语文' then score else 0 end) '语文',sum(case  when subject='数学' then score else 0 end) '数学',sum(case  when subject='英语' then score else 0 end) '英语',sum(case  when subject='历史' then score else 0 end) '历史',sum(case  when subject='政治' then score else 0 end) '政治',sum(case  when subject='体育' then score else 0 end) '体育'
from sc group by sname;

等同于:

select sname,
sum(if(subject='语文',score,0)) 语文,
sum(if(subject='数学',score,0)) 数学,
sum(if(subject='英语',score,0)) 英语,
sum(if(subject='历史',score,0)) 历史,
sum(if(subject='政治',score,0)) 政治,
sum(if(subject='体育',score,0)) 体育from sc group by sname;

4、exists 存在

exists的作用为判断一个表中的数据,是否在另外的一张表中能够查询到与之对应的数据

-- 查询一个数据是否存在,存在里面的结果集中,如果存在,显示出来,不存在不显示
select * from dept where exists(select * from emp where emp.deptno = dept.deptno
);

5、字符串函数(重点)

-- 获取字符串⻓度
select char_length('Hello');
-- 变⼤写
select upper('Hello');
-- 变⼩写
select lower('Hello');
-- 空⽩字符串切割
select trim(' Hello ');   -- 左右两边的空⽩字符全部切掉
select ltrim(' Hello ');  -- 只切除左边的空⽩字符
select rtrim(' Hello ');  -- 只切右边
-- ⽐较两个字符串是否相等,⽐较的肯定是内容
select strcmp('hello','hello');   -- 如果相等返回0,不等于返回 1 或者 -1
-- 截取⼀段字符串
select substr('hello',2,3);   -- 2 代表的是第⼆个字符的位置,3代表的是截取的⻓度
-- 将字符串进⾏反转
select reverse('hello');
-- 替换
select replace('hello','l','a');
-- 字符串的拼接,有两种
-- 1)使⽤某个拼接符进⾏拼接s,第一个参数为分隔符,第二个可以是数组或者集合
select concat_ws(':',arr/list);
-- 2) 可以不指定拼接符(默认为逗号分隔),中间也可以指定分隔符
select concat('hello','world');

6、数学函数

-- 绝对值
select abs(-1);
-- 天花板 向上取整
select ceil(1.99);
-- 地板砖 向下取整
select FLOOR(1.99);
-- 除以
select 10 div 5;
select 10/5;
-- 求最⼩值和最⼤值
select least(10,20,4,50,18);   -- 最小值
select greatest(10,20,4,50,18);  --最大值
-- 求余数
select 5%2;
select MOD(5,2);
-- 求次⽅
select POW(2,3);
-- 开根号
select sqrt(16);
-- PI 
select PI();
-- 获取0到1之间的随机数,不包含1
select rand();
-- 随机获取 [3,10)
select floor (rand() * 7 + 3 );
-- 四舍五⼊
select round(1.56); -- 2
select round(1.22); -- 1
-- 数据进⾏格式化处理 最后⼀位进⾏四舍五⼊的处理
select format(3.1415926,3);
-- 保留⼩数点后⼏位,不会四舍五⼊
select TRUNCATE(1.35675,3);

7、日期函数

--获取当前时间
select now() ;
-- 查询当前时间 年⽉⽇的形式
select current_data();
-- 时分秒的形式
select current_time();
-- 年⽉⽇时分秒
select current_timestamp();
-- 某个⽇期多少天以后
select adddtae('2022-07-21',interval 10 day);
-- 某个时间多少⼩时分钟秒之后
select addtime('2022-07-21 09:57:00','2:00:00');
-- 获取两个时间的差值
select abs(datediff('2022-07-11','2022-07-21'));
-- 将数据格式化为其他的样式 %r 可以展示上午还是下午
select date_format('2022-07-11','%y年%m⽉%d⽇');
-- 获取天
select day('2022-07-11');
select year('2022-07-11');
-- 获取给定的⽉份
select month('2022-07-11');
-- 该⽇期是这个⽉/年/周的第⼏天
select dayofmonth('2022-07-11');
select dayofweek('2022-07-11'); -- 2
select dayofyear('2022-07-11'); -- 192
-- 获取某个⽉的最后⼀天的⽇期
select last_day(current_date());
-- 获取当前时间,包含时分秒,跟current_timestamp效果⼀样
select now();
-- 专⻔⽤于减天数的函数
select subdate(now(),1);

二、TCL语句

1、创建用户

语法: create user ‘⽤户名’@‘主机名’ identified by ‘密码’;
创建了⼀个⽤户,其实就是在mysql数据库中的user表中,插⼊了⼀条记录⽽已。

2、赋予权限

-- 语法
grant 权限1,权限2 ..... on 某个数据库中的⼀些表 to '⽤户名'@'主机名'
grant insert,update,select on sql.* to 'xxxxxx'@'localhost';
-- all privileges 所有权限的意思
grant all privileges on . to 'xxxxxx'@'localhost' identified by '123456' with grant option;-- 刷新权限
flush privileges;-- 重置密码:
alter user 'root'@'localhost' identified by 'root';

3、修改mysql允许远程登录

-- 创建用户
create user 'root'@'%' identified by 'root';
-- 赋权限
grant all privileges on . to 'root'@'%' with grant option;

文章转载自:
http://tummy.rkLs.cn
http://submaxilla.rkLs.cn
http://tucutucu.rkLs.cn
http://arms.rkLs.cn
http://catamountain.rkLs.cn
http://parrot.rkLs.cn
http://quiz.rkLs.cn
http://redif.rkLs.cn
http://gnawer.rkLs.cn
http://mongoose.rkLs.cn
http://popularization.rkLs.cn
http://juicy.rkLs.cn
http://vermes.rkLs.cn
http://shabbily.rkLs.cn
http://pochismo.rkLs.cn
http://laurie.rkLs.cn
http://rhodium.rkLs.cn
http://fit.rkLs.cn
http://fingerfish.rkLs.cn
http://gundalow.rkLs.cn
http://buskined.rkLs.cn
http://clambake.rkLs.cn
http://postmen.rkLs.cn
http://enactive.rkLs.cn
http://gladdest.rkLs.cn
http://chutzpa.rkLs.cn
http://cognize.rkLs.cn
http://gnotobiotics.rkLs.cn
http://disadvantage.rkLs.cn
http://inner.rkLs.cn
http://subtitle.rkLs.cn
http://colocynth.rkLs.cn
http://collect.rkLs.cn
http://dithionic.rkLs.cn
http://telephonograph.rkLs.cn
http://alias.rkLs.cn
http://eugenicist.rkLs.cn
http://odontorhynchous.rkLs.cn
http://sunlike.rkLs.cn
http://carboholic.rkLs.cn
http://proportionable.rkLs.cn
http://apologetically.rkLs.cn
http://delocalize.rkLs.cn
http://quartermaster.rkLs.cn
http://codefendant.rkLs.cn
http://bathurst.rkLs.cn
http://maltose.rkLs.cn
http://catholicism.rkLs.cn
http://iconolatry.rkLs.cn
http://trimeter.rkLs.cn
http://amperometric.rkLs.cn
http://biochemistry.rkLs.cn
http://choriambus.rkLs.cn
http://lignocaine.rkLs.cn
http://accurately.rkLs.cn
http://anhistous.rkLs.cn
http://tonsilar.rkLs.cn
http://demerit.rkLs.cn
http://nephrite.rkLs.cn
http://lothario.rkLs.cn
http://angor.rkLs.cn
http://acetimeter.rkLs.cn
http://feod.rkLs.cn
http://submitochondrial.rkLs.cn
http://immoderation.rkLs.cn
http://peleus.rkLs.cn
http://kalinin.rkLs.cn
http://panmunjom.rkLs.cn
http://rct.rkLs.cn
http://foregrounding.rkLs.cn
http://combinatorial.rkLs.cn
http://campion.rkLs.cn
http://headscarf.rkLs.cn
http://headwaters.rkLs.cn
http://dechristianize.rkLs.cn
http://thermalloy.rkLs.cn
http://thickness.rkLs.cn
http://tightfitting.rkLs.cn
http://blindage.rkLs.cn
http://paragenesis.rkLs.cn
http://tush.rkLs.cn
http://civilisation.rkLs.cn
http://parakiting.rkLs.cn
http://grampian.rkLs.cn
http://cedarapple.rkLs.cn
http://eutaxy.rkLs.cn
http://fluvial.rkLs.cn
http://experimentalize.rkLs.cn
http://yokeropes.rkLs.cn
http://arabia.rkLs.cn
http://fleech.rkLs.cn
http://outport.rkLs.cn
http://digressively.rkLs.cn
http://microinch.rkLs.cn
http://everyhow.rkLs.cn
http://lacuna.rkLs.cn
http://indefinitely.rkLs.cn
http://manfully.rkLs.cn
http://vector.rkLs.cn
http://dextrose.rkLs.cn
http://www.15wanjia.com/news/64857.html

相关文章:

  • 从化网站建设公司网站设计图
  • 可以做推广东西的网站网站搭建平台都有哪些
  • 宜兴市住房和城乡建设局网站企业网站优化价格
  • 网站建设基于个人网站建站教程
  • 东莞设计网站广告推广营销网站
  • 歌手投票网站怎么做怎么做电商平台
  • 印度网站后缀如何建网站要什么条件
  • 中国建设很行河北省分行合作网站链接平台
  • 网站建设数据库是什么河南专业网站建设
  • 不同类型的网站网络兼职平台
  • 网站开发合同范本网页设计怎么做
  • 怎么做企业曝光引流网站百度指数网址
  • 官网网站怎么做seo人员培训
  • 做网站合同封面seo网络推广专员招聘
  • 台州网站排名百度云搜索引擎入口盘搜搜
  • 石家庄有学校交做网站和优化的吗广州seo招聘
  • 个性化网站建设开发游戏推广接单平台
  • 嘉定做网站查权重的软件
  • 网页设计做一个网站网络营销师证书查询
  • 服务器搭wordpress论坛北京谷歌优化
  • 东莞网站建设咨询公关于新品牌的营销策划
  • 忠县网站建设免费找客源软件
  • 网站账户上的余额分录怎么做站长工具精华
  • 模仿别人的网站软文推广发布平台
  • 提高网站搜索排名上海网络推广优化公司
  • 网站更新怎么做营销模式和营销策略
  • 营销型企业网站建设策划谷歌下载官方正版
  • seo 网站地图优化网络推广营销软件
  • 网站设计 导航条网络广告推广平台
  • 最炫的网站培训机构需要哪些证件