CREATE USER 'hr'@'localhost' IDENTIFIED BY '1234';
GRANT ALL PRIVILEGES ON company.* TO 'hr'@'localhost';
CREATE TABLE user_table(
id INT NOT NULL AUTO_INCREMENT,
user VARCHAR(20) NOT NULL,
password VARCHAR(30) NOT NULL,
PRIMARY KEY (id )
);
insert into user_table (user, password) values("guest","123456");
alter table location add my_point point;// location with 经纬坐标
update location SET my_point = PointFromText(CONCAT('POINT(',long,' ',latt,')'));
将会自动计算,以blob形式存储
No comments:
Post a Comment