CREATE TABLE java_store(
java_store_id int NOT NULL AUTO_INCREMENT,
file_name VARCHAR(256) NOT NULL,
version_id int NOT NULL,
save_time TIMESTAMP NOT NULL,
this_version TEXT NOT NULL,
notes VARCHAR(512),
PRIMARY KEY (java_store_id)
)
String Types
Date and Time Types
SQL Special Characters
URL Encoding
Bytes-Hex
select count(*) into @jscount from java_store where file_name=@class_name;
insert into java_store (file_name, version_id, save_time,this_version,notes)
values(@class_name,(@jscount+1),NOW(),"public class my()...","just a test");
new_version.sql
delimiter //
create procedure new_version(in class_name VARCHAR(256),in the_version TEXT, in the_notes VARCHAR(512))
begin
select count(*) into @jscount from java_store where file_name=class_name;
insert into java_store (file_name, version_id, save_time,this_version,notes)
values(class_name,(@jscount+1),NOW(),the_version,the_notes);
end;
//
delimiter ;