常用sql语句

create database myblog;

show databases;

grant all on myblog.* to 'adang'@'localhost' identified by '1234';

select name , age from myblog;

SELECT id, name, address, city, state_province, country, website
FROM books_publisher
WHERE name LIKE '%press%';


INSERT INTO books_publisher
(name, address, city, state_province, country, website)
VALUES
('Apress', '2855 Telegraph Ave.', 'Berkeley', 'CA',
'U.S.A.', 'http://www.apress.com/');

UPDATE books_publisher SET
name = 'Apress Publishing',
address = '2855 Telegraph Ave.',
city = 'Berkeley',
state_province = 'CA',
country = 'U.S.A.',
website = 'http://www.apress.com'
WHERE id = 52;
posted on 2010-06-08 23:08  真阿当  阅读(85)  评论(0编辑  收藏  举报