如果要插入一条员工数据,则下列选项正确的是()
A: INSERT INTO Employee(Name,Gender,Age,Rank) values('张朝阳','男',48,'201')
B: INSERT INTO Employee(Name,Gender,Age,Rank) values(“张朝阳”,”男”,48,”201”)
C: INSERT INTO Employee(Name,Gender,Age) values(‘张朝阳','男',48,'201')
D: INSERT INTO Employee(Name,Gender,Age,Rank) value(‘张朝阳','男',48,'201')
A: INSERT INTO Employee(Name,Gender,Age,Rank) values('张朝阳','男',48,'201')
B: INSERT INTO Employee(Name,Gender,Age,Rank) values(“张朝阳”,”男”,48,”201”)
C: INSERT INTO Employee(Name,Gender,Age) values(‘张朝阳','男',48,'201')
D: INSERT INTO Employee(Name,Gender,Age,Rank) value(‘张朝阳','男',48,'201')
举一反三
- 【单选题】下面的if语句统计满足“性别(gender)为男、职称(rank)为教授、年龄(age)小于40岁”条件的人数,正确的语句为 (2.0分) A. if (gender=="男" or age<40 and rank="教授"): n+=1 B. if (gender=="男" and age<40 and rank="教授"): n+=1 C. if (gender=="男" and age<40 or rank="教授"): n+=1 D. if (gender=="男" or age<40 and or="教授"): n+=1
- 下列( )方法定义和调用的代码是正确的。 A: static void Introduce(string gender = "男", string name, int age = 18){} Introduce(name: "alex", age: 20); B: static void Introduce(string name, int age = 18, string gender = "男"){} Introduce(age: 20, name: "alex"); C: static void Introduce(string gender = "男", string name, int ago = 18){} Introduce(age: 20, name: "alex"); D: static void Introduce(string name, int age = 18, string gender = "男"){}Introduce(name: "alex", age: 20);
- 有如下类的定义,创建Employee对象错误的是() public class Employee{ private int age; private String name; public Employee(int age){ this.age = age; } public Employee(String name){ this.name = name; } public Employee(int age,String name){ this(age); this.name = name; } } A: Employee emp = new Employee(10); B: Employee emp = new Employee("Tom"); C: Employee emp = new Employee(); D: Employee emp = new Employee(10,"Tom");
- 设有如下关系表S(NO,NAME,SEX,AGE,CLASS),主关键字是NO,其中NO为学号,NAME为姓名,SEX为性别,AGE为年龄,CLASS为班号。插入“95031”班学号为30、姓名为“郑和”的学生记录,下列语句正确的是( )。 A: INSERT INTO S VALUES(30,'郑和','95031') B: INSERT INTO S(NO,NAME,SEX,AGE,CLASS) VALUES(30,'郑和','95031') C: INSERT INTO S(NO,NAME,CLASS) VALUES(30,'郑和','95031') D: INSERT INTO S(NO,NAME,SEX,AGE,CLASS) VALUES(30,'郑和', 'NULL', 'NULL','95031')
- 有如下类的定义,创建Employee对象正确的是() public class Employee{ private int age; private String name; public void Employee(){ } public Employee(int age){ this.age = age; } public Employee(String name){ this.name = name; } } A: Employee e = new Employee( ) B: Employee e = new Employee(10); C: Employee e = new Employee(tom); D: Employee e = new Employee(10,"tom");