每次我尝试在oracle中运行此代码时,我都会收到以下消息.代码如下:
DROP TABLE movie;
CREATE TABLE movie (movie_id NUMBER(5) PRIMARY KEY,
title VARCHAR2(45) NOT NULL,
description VARCHAR2(250) NOT NULL,
released_by NUMBER(3) NOT NULL,
released_on DATE NOT NULL);
INSERT INTO movie (movie_id, title, description, released_by, released_on)VALUES ('1', 'Edge of Tomorrow', 'Lieutenant Colonel Bill Cage is a skilled tactician who has honed his abilities through his experiences as a soldier. However, there is still much he can learn, and soon he is going to get his chance.', '1', '07-OCT-2014');
INSERT INTO movie …Run Code Online (Sandbox Code Playgroud) 我的任务是删除名称以Z或z开头的任何教职员工.我已经尝试了一些我一直在研究的代码,但是无法使其正常工作.以下是创建表,插入表,最后我尝试删除条目的代码:
CREATE TABLE Faculty (
FacultyID int primary key,
FirstName varchar(30),
LastName varchar(30),
EMail varchar(60),
BirthDate DATE,
Numbr_Courses int
);
insert into Faculty
values (10579, 'John','Spelling','jspelling@faculty.umuc.edu','1983-06-26','5');
insert into Faculty
values (10894, 'Ron','Danning','rdanning@faculty.umuc.edu','1976-06-12','4');
insert into Faculty
values (23487, 'Blair','Davidson','bdavidson@faculty.umuc.edu','1977-08-27','2');
insert into Faculty
values (13456, 'David','Burtner','dburtner@faculty.umuc.edu','1967-11-04','3');
insert into Faculty
values (78546, 'Jessica','Dawn','jdawn@faculty.umuc.edu','1973-05-28','3');
insert into Faculty
values (23564, 'Randy','Zilman','rgilman@faculty.umuc.edu','1975-10-04','3');
insert into Faculty
values (85462, 'Carol','Lily','clily@faculty.umuc.edu','1954-07-16','3');
insert into Faculty
values (45126, 'Jason','Borne','jborne@faculty.umuc.edu','1963-01-26','4');
insert into Faculty
values (65894, 'Tom','Cruise','tcruise@faculty.umuc.edu','1965-08-01','3');
insert into Faculty
values (56451, 'Michael','Jordan','mjordan@faculty.umuc.edu','1959-12-26','3'); …Run Code Online (Sandbox Code Playgroud) 您好我正在尝试为类赋值创建递归方法.作业如下:
在Person类中实现一个方法,该方法使用递归基于以下公式计算指标m:
m(年龄)= 1 + 1/2 + 1/3 + 1/4 + 1/5 ... + 1 /年龄
我之前已经成为了这个人.所以一切正常.但是在它中实现这种递归方法会给我带来错误.我在递归方法中的if语句表示不兼容的类型:int无法转换为Boolean.我没有看到它认为我在做布尔变量转换的地方.另外,在我的方法中我的递归,它说,意外的类型.
/**
*
* @author Randy
*/
public class Person2 {//begin class
//declare variables
String name;
int year_of_birth;
boolean isStudying;
boolean isEmployed;
int age;
int result;
public Person2(boolean isEmployed, boolean isStudying){//begin constructor
this.isEmployed = isEmployed;
this.isStudying = isStudying;
}//end constructor
public Person2(){//begin constructor
this.isEmployed = false;
this.isStudying = false;
}//end constructor
public int getYear(){//get year method
return year_of_birth;
}//end method
public String getName(){//get name …Run Code Online (Sandbox Code Playgroud)