我的作业呢

创建数据库company,在库中创建两个表offices和employees表
create database company;
use company;
create table offices(
officeCode int(10) PRIMARY KEY NOT NULL UNIQUE,
city VARCHAR(50) NOT NULL,
address VARCHAR(50),
country VARCHAR(50) NOT NULL,
postalCode VARCHAR(15) UNIQUE
);
create table employees(
employeeNumber int(11) PRIMARY KEY not null unique auto_increment,
lastName VARCHAR(50) not null,
firstName VARCHAR(50) not null,
mobile VARCHAR(25) unique,
officeCode int(10) not null,
jobTitle varchar(50) not null,
birth datetime not null,
note varchar(255),
sex varchar(5)
);
查看该库下几个表以及查看两张表结构
show tables;
desc employees;
desc offices;
将表employees的mobile字段修改到officeCode字段后面
alter table employees modify mobile varchar(25) after officeCode;
将表employees的birth字段改名为employee_birth
alter table employees change birth employee_birth datetime;
修改sex字段,数据类型为CHAR(1),非空约束
alter table employees modify sex char(1) not null;
删除字段note
alter table employees drop note;
增加字段名favoriate_activity,数据类型为VARCHAR(100)
alter table employees add favority_activity varchar(100);
删除表offices
drop table offices;
将表employees名称修改为employees_info
alter table employees rename to employees_info;

根据提供的引用内容,以下是一个简单的HTML我的家乡网页作业的示例: ```html <!DOCTYPE html> <html> <head> <title>我的家乡</title> <style> /* CSS样式 */ body { background-color: #f2f2f2; font-family: Arial, sans-serif; } header { background-color: #333; color: #fff; padding: 20px; text-align: center; } nav { background-color: #666; padding: 10px; text-align: center; } nav a { color: #fff; text-decoration: none; margin: 0 10px; } nav a:hover { color: #ff0000; } section { padding: 20px; margin-bottom: 20px; background-color: #fff; } footer { background-color: #333; color: #fff; padding: 20px; text-align: center; } </style> </head> <body> <header> <h1>欢迎来到我的家乡</h1> </header> <nav> <a href="index.html">首页</a> <a href="history.html">家乡历史</a> <a href="scenery.html">家乡美景</a> <a href="celebrities.html">家乡名人</a> <a href="food.html">家乡美食</a> <a href="architecture.html">家乡建筑</a> </nav> <section> <h2>首页</h2> <p>这是我的家乡网页作业的首页内容。</p> </section> <section> <h2>家乡历史</h2> <p>这是我的家乡网页作业的家乡历史页面内容。</p> </section> <section> <h2>家乡美景</h2> <p>这是我的家乡网页作业的家乡美景页面内容。</p> </section> <section> <h2>家乡名人</h2> <p>这是我的家乡网页作业的家乡名人页面内容。</p> </section> <section> <h2>家乡美食</h2> <p>这是我的家乡网页作业的家乡美食页面内容。</p> </section> <section> <h2>家乡建筑</h2> <p>这是我的家乡网页作业的家乡建筑页面内容。</p> </section> <footer> <p>版权所有 © 2021 我的家乡</p> </footer> </body> </html> ``` 这个示例中,使用了简单的DIV CSS布局,包括一个页眉(header)、导航栏(nav)、内容区域(section)和页脚(footer)。每个页面都有一个标题和相应的内容。你可以根据需要修改页面的样式和内容。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值