SQL入门

学学数据库

SELECT 查

SELECT 列 FROM 表

SELECT 'fakin' FROM BLOG

SELECT * FROM BLOG

INSERT 添

插入新的数据不提供列名

INSERT INTO BLOG VALUES (`hello`,`word`)

提供列名

INSERT INTO BLOG(`name`,`text`) VALUES (`hello`,`word`)

UPDATE 改

UPDATE BLOG SET FirstName = 'fakin' WHERE LastName = 'blog'

DELETE 删

DELETE FROM BLOG WHERE LastName = 'blog'

SQL入门》有3个想法

评论已关闭。