SELECT * FROM OBD_DATA;oracle
CREATE TABLE AAA_Huch
(
StudentID varchar2(50) primary key,
StudentName varchar2(50) default '' not null
);ide
SELECT * FROM AAA_HUCH;it
--因为StudentName是not null,插入的时候不能赋null,不然会报错
INSERT INTO AAA_Huch(StudentID)
VALUES('AA');table
--也不能这样
INSERT INTO AAA_Huch(StudentID,StudentName)
VALUES('AA',NULL);class
--这样也会报错,oracle中''会当成null处理
INSERT INTO AAA_Huch(StudentID,StudentName)
VALUES('bb','');select
--只能这样,插入一个空格符
INSERT INTO AAA_Huch(StudentID,StudentName)
VALUES('bb',' ');im
alter table aaa_huch
add sex int default 0;tab
INSERT INTO AAA_Huch(StudentID,StudentName)
VALUES('cc','cc');di
select * from alarm_info;view