SQL教程

SELECT语句

-- Websites:
+----+--------------+---------------------------+-------+---------+
| id | name         | url                       | alexa | country |
+----+--------------+---------------------------+-------+---------+
| 1  | Google       | https://www.google.cm/    | 1     | USA     |
| 2  | 淘宝          | https://www.taobao.com/   | 13    | CN      |
| 3  | 菜鸟教程      | http://www.runoob.com/    | 4689  | CN      |
| 4  | 微博          | http://weibo.com/         | 20    | CN      |
| 5  | Facebook     | https://www.facebook.com/ | 3     | USA     |
+----+--------------+---------------------------+-------+---------+
create table 'Websites' (
	id int not null primary key auto_increment,
	name char(20) not null,
	url varchar(40) null,
	alexa int null,
	country char(10) null
)default charset = utf8;

insert into Websites
values
	(1, 'Google', 'https://www.google.com/', 1, 'USA'),
	(2, '淘宝', 'https://www.taobao.com/', 13, 'CN'),
	(3, '菜鸟', 'https://www.runoob.com/', 4689, 'CN'),
	(4, '微博', 'http://weibo.com/', 20, 'CN'),
	(5, 'Facebook', 'https://www.facebook.com/', 3, 'USA')


posted @ 2024-05-18 21:52  Aorphine  阅读(3)  评论(0编辑  收藏  举报