文章分类 -  mysql

摘要:定义和用法 DATE_FORMAT() 函数用于以不同的格式显示日期/时间数据。 语法 date 参数是合法的日期。format 规定日期/时间的输出格式。 可以使用的格式有: 格式描述 %a 缩写星期名 %b 缩写月名 %c 月,数值 %D 带有英文前缀的月中的天 %d 月的天,数值(00-31) 阅读全文
posted @ 2018-04-23 13:29 微风吹过jy 阅读(93) 评论(0) 推荐(0)
摘要:单位:米 select *,(2 * 6378.137* ASIN(SQRT(POW(SIN(PI()*(111.86141967773438-lat)/360),2)+COS(PI()*33.07078170776367/180)* COS(lat * PI()/180)*POW(SIN(PI() 阅读全文
posted @ 2017-12-18 14:49 微风吹过jy 阅读(279) 评论(0) 推荐(0)
摘要:以下是mysql备份 drop database if exists test;create database if not exists test default charset=utf8;use test; CREATE TABLE `tower` ( `id` int(11) NOT NULL 阅读全文
posted @ 2017-09-14 09:11 微风吹过jy 阅读(1447) 评论(0) 推荐(0)
摘要:1.创建表 CREATE TABLE `c_zone` ( `id` int(11) NOT NULL auto_increment, `name` varchar(100) NOT NULL, `ploygongeo` text NOT NULL, PRIMARY KEY (`id`) ) ENG 阅读全文
posted @ 2017-05-15 14:20 微风吹过jy 阅读(845) 评论(0) 推荐(0)
摘要:字符串函数 ASCII(str) 返回字符串str的第一个字符的ASCII值(str是空串时返回0) mysql> select ASCII('2'); -> 50 mysql> select ASCII(2); -> 50 mysql> select ASCII('dete'); -> 100 O 阅读全文
posted @ 2016-11-03 11:36 微风吹过jy 阅读(80) 评论(0) 推荐(0)
摘要:1.出现问题 ERROR 1130 (HY000): Host '192.168.6.95' is not allowed to connect to this MySQL server 数据库禁止此IP(192.168.6.95)通过此账号访问 需要在数据库中授权,登录数据库中执行以下SQL GR 阅读全文
posted @ 2016-10-25 14:17 微风吹过jy 阅读(76) 评论(0) 推荐(0)