MySQL 按列名选择
示例
CREATE TABLE stack(id INT,
username VARCHAR(30) NOT NULL,
password VARCHAR(30) NOT NULL
);
INSERT INTO stack (`id`, `username`, `password`) VALUES (1, 'Foo', 'hiddenGem');
INSERT INTO stack (`id`, `username`, `password`) VALUES (2, 'Baa', 'verySecret');
询问
SELECT id FROM stack;
结果
+------+| id |
+------+
| 1 |
| 2 |
+------+
以上是 MySQL 按列名选择 的全部内容, 来源链接: utcz.com/z/315828.html