DataBase MiniSQL
- c++17 δ»₯δΈ
- GNU make
-
ε建葨
create table student ( sid char(8) unique , //char(n) 1 <= n <= 255 sname char(20) , sage int , scome float , primary key (sid) ); // ζε€32δΈͺε±ζ§
-
ε ι€θ‘¨
drop table student;
-
εε»Ίη΄’εΌ
create index stuname on student(sname);
-
ε ι€η΄’εΌ
drop index stuname on student;
-
ιζ©θ―ε₯
select * from student; select * from student where sid = '88888888'; select * from student where sage > 20 and scome < 2000; // < > <= >= <> =
-
ζε ₯θ―ε₯
insert into student values('88888888','xiaoming',20,2000.00);
-
ε ι€θ―ε₯
delete from student; delete from student where sid = '88888888';
-
ιεΊθ―ε₯
quit;
-
ζ§θ‘θζ¬
execfile test.txt;
- θΏεζ₯θ―’ζΆι΄γζ§θ‘θΏεζε½±εηθ‘ζ°γιθ――δΏ‘ζ―