madhare.sql
来自「derby database source code.good for you.」· SQL 代码 · 共 45 行
SQL
45 行
---- this test shows the basic functionality-- that does work in the language system for mad hare---- this was the simple mad hare challengecreate table t(i int);insert into t (i) values (1956);select i from t;-- we can also have multiple columnscreate table s (i int, n int, t int, e int, g int, r int);-- and reorder the columns on the insertinsert into s (i,r,t,n,g,e) values (1,6,3,2,5,4);-- or not list the columns at all-- (not to mention inserting more than one row into the table)insert into s values (10,11,12,13,14,15);-- and we can select some of the columnsselect i from s;-- and in funny ordersselect n,e,r,i,t,g from s;-- and with constants insteadselect 20,n,22,e,24,r from s;-- we do have prepare and execute supportprepare stmt as 'select i,n,t,e,g,r from s';execute stmt;-- execute can be done multiple timesexecute stmt;-- and, we also have smallint!create table r (s smallint, i int);insert into r values (23,2);select s,i from r;-- cleanupdrop table r;drop table s;drop table t;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?