mysql教程
CREATE TABLE `user` ( `id` int(11) NOT NULL, `name` varchar(10) DEFAULT NULL, `age` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
查看所有字段:
mysql> select * from user; +----+---------+------+ | id | name | age | +----+---------+------+ | 1 | zhansan | 30 | | 2 | lisi | 40 | | 3 | wangwu | 50 | +----+---------+------+ 3 rows in set (0.00 sec)
查看部分字段:
mysql> select name,age from user; +---------+------+ | name | age | +---------+------+ | zhansan | 30 | | lisi | 40 | | wangwu | 50 | +---------+------+ 3 rows in set (0.00 sec)