You own a table called EMPLOYEES with this table structure: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE What happens when you execute this DELETE statement? DELETE employees;()
A: AYou get an error because of a primary key violation.
B: BThe data and structure of the EMPLOYEES table are deleted.
C: CThe data in the EMPLOYEES table is deleted but not the structure.
D: DYou get an error because the statement is not syntactically correct.
A: AYou get an error because of a primary key violation.
B: BThe data and structure of the EMPLOYEES table are deleted.
C: CThe data in the EMPLOYEES table is deleted but not the structure.
D: DYou get an error because the statement is not syntactically correct.
举一反三
- 下来定义表的约束语法,错误的是() A: create table t1(id number primary key,name varchar2(10)) B: create table t1(id number constraint p_k primary key(id),name varchar2(10)) C: create table t1(id number constraint p_k primary key,name varchar2(10)) D: create table t1(id number,name varchar2(10),primary key(id))
- employees表结构些如下: PLOYEE_ID NUMBER Primary Key RST_NAME VARCHAR2(25) ST_NAME VARCHAR2(25) NOT NULL 哪条语句正确插入employees一条记录?
- 下列关于主键约束的语句哪个不正确 A: CREATE TABLE STU(no INT PRIMARY KEY,name VARCHAR2(20)) B: CREATE TABLE STU(no INT,name VARCHAR2(20),PRIMARY KEY(no)) C: CREATE TABLE SCORE(sno INT,cno INT,score INT,PRIMARY KEY(sno,cno)) D: CREATE TABLE SCORE(sno INT PRIMARY KEY,cno INT PRIMARY KEY,score INT)
- SQL语句的程序清单如下: create table employees( id char(8) primary key, name char(20) not null, department char(20) null, memo char(30) null, age int null, ) alter table employees add salary int null, drop column age, alter column memo varchar(200) null 下面说法正确的是?
- 关于以下语句,叙述正确的是 mysql > CREATE TABLE is ->( -> stuID VARCHAR(11) PRIMARY KEY, -> stuName VARCHAR(30) NOT NULL, -> stuSex VARCHAR(2) NOT NULL, -> stuBirth DATE, -> stuSchool VARCHAR(30))