【单选题】将person表的person_name字段修改为p_name,数据类型为 char,长度为20,以下命令正确的是______。
A. lter table person change person_name rename p_name char(20);
B. alter table person change person_name to p_name char(20);
C. alter table person modify person_name p_name char(20);
D. alter table person change person_name p_name char(20);
A. lter table person change person_name rename p_name char(20);
B. alter table person change person_name to p_name char(20);
C. alter table person modify person_name p_name char(20);
D. alter table person change person_name p_name char(20);
举一反三
- 能将字符串存储到name数组中的选项有() A: char name[20], *p;p=name;gets(name); B: char name[20], *p;p=name;gets(p); C: char name[20], *p;p=name;scanf("%s",name); D: char name[20], *p;p=name;scanf("%s",p);
- 阅读下面代码: Person 类: public class Person { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } } Servlet1: request.getSession().setAttribute("name","zhangsan"); Person p = new Person(); p.setName("lisi"); request.getSession().setAttribute("person",p); Servlet2: String name1 = (String)request.getSession().getAttribute("name"); Person p = (Person)request.getSession().getAttribute("person"); response.getWriter().write(name1); if(p!=null)response.getWriter().write(p.getName()); 浏览器先访问Servlet1,再去访问Servlet2,输出的结果是:()
- 下面哪一条语句不正确: A: enum Gender{female, male}; B: struct Person{ char name[20]; Gender sex; C: Person father; D: };Person members[30];
- 在C#中,下列结构或者类定义正确的是(选一项) A: public struct Person{ string name; int age; public void ShowName(){ Console.WriteLine(name); }} B: public struct Person{ string name; int age; public Person(){ Conssole.WriteLine(name); }} C: public class Person{ string name; int age; public Person(){ Conssole.WriteLine(name); }} D: public class Person{ string name; int age; public Person(string name){ Conssole.WriteLine(name); }}
- (6-9)定义了如下Person类,下面程序段能够正确初始化Person数组。 class Person{ private String name; public Person(String name){ this.name=name; } }