我正在记事本中的HTML代码正文中编写一个简单的SQL代码。我已将记事本文件另存为.html在文件夹中。现在,我希望其他人只能在网站上看到该代码。整体看起来如何。
因此,在此过程中,我在GitHub上开设了一个帐户,并下载了GitHub桌面应用程序。我克隆了代码所在的文件存储库。我不知道将代码部署到网站的下一个过程。
<!DOCTYPE html>
<html>
<head>
<title>QUICK SQL CODE</title>
</head>
<body>
create table departments (
id numeric(10) not null,
name varchar2(255) not null,
location varchar2(4000),
country varchar2(4000),
CONSTRAINT id PRIMARY KEY (id)
) ;
<br>
<br>
create table employees (
department_id number
constraint employees_department_id_fk
references departments on delete cascade,
name varchar2(50) not null,
email varchar2(255),
cost_center number,
date_hired date,
job varchar2(255)
) ;
insert into departments (
id,
name,
location,
country
) values (
'1',
'Security',
'Tanquecitos',
'United States'
);
<br>
<br>
insert into departments (
id,
name,
location,
country
) values (
'2',
'Travel',
'Sugarloaf',
'United States'
)
;
<br>
<br>
insert into departments (
id,
name,
location,
country
) values (
'3',
'Office of the CEO',
'Dale City',
'United States'
);
<br>
<br>
insert into departments (
id,
name,
location,
country
) values (
'4',
'Security',
'Grosvenor',
'United States'
);
<br>
<br>
commit;
<br>
insert into employees (
department_id,
name,
email,
cost_center,
date_hired,
job
) values (
1,
'Gricelda Luebbers',
'gricelda.luebbers@aaab.com',
20,
sysdate - 94,
'Systems Designer'
);
<br>
<br>
insert into employees (
department_id,
name,
email,
cost_center,
date_hired,
job
) values (
1,
'Dean Bollich',
'dean.bollich@aaac.com',
11,
sysdate - 74,
'Legal Assistant'
);
<br>
<br>
insert into employees (
department_id,
name,
email,
cost_center,
date_hired,
job
) values (
1,
'Milo Manoni',
'milo.manoni@aaad.com',
21,
sysdate - 68,
'Systems Designer'
);
<br>
<br>
insert into employees (
department_id,
name,
email,
cost_center,
date_hired,
job
) values (
1,
'Laurice Karl',
'laurice.karl@aaae.com',
78,
sysdate - 73,
'Programmer'
)
;
<br>
<br>
select
departments.name department_name,
departments.location location,
departments.country country,
employees.name employee_name,
employees.email email,
employees.cost_center cost_center,
employees.date_hired date_hired,
employees.job job
from
departments,
employees;
<br>
<br>
commit;
<br>
<br>
OUTPUT :
Table created.
<br>
<br>
Table created.
<br>
<br>
1 row(s) inserted.
<br>
<br>
1 row(s) inserted.
<br/>
1 row(s) inserted.
<br>
<br>
1 row(s) inserted.
<br>
<br>
Statement processed.
<br>
<br>
1 row(s) inserted.
<br/>
1 row(s) inserted.
<br>
<br>
1 row(s) inserted.
<br>
<br>
1 row(s) inserted.
<br>
<br>
<h2>OUTPUT OF THE TABLE</h2>
<img src ='C:\Users\Saumyojit\Desktop\oracle sql live\output of experiment 1 id pkey.png'>
</body>
</html>
如何将其上传到实时网站上?
答案 0 :(得分:0)
您的网站具有cPanel或其他托管软件。托管提供商使用这种软件。因此,请您的托管服务提供商或您的客户为您提供凭据,并在登录后找到托管您网站的目标文件夹。
之后,您可以根据需要将此文件放置在根目录或任何其他子文件夹中。