⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sample.msql

📁 uClinux下用的数据库
💻 MSQL
字号:
## Sample miniSQL script file.  #drop table test \p\gdrop table test2\p\gcreate table test (	name	char(10),	age	int,	phone	char(20))\p\gcreate index idx1 on test (name)\p\gcreate table test2 (	user	char(10),	name	char(30)) \p\gcreate index idx1 on test2 (user)\p\ginsert into test ( name, age, phone)	values ( 'Bambi', 26, '(075) 951450')\p\ginsert into test ( name, age, phone)	values ( 'paulp', 25, '(075) 951412')\p\ginsert into test2 (user, name) values ('paulp','Paul Pyyvaara') \p\ginsert into test2 (user, name) values ('Bambi','David J. Hughes') \p\g## This has a NULL name field and should fail due to the "not null"# clause implied by the primary key #insert into test (age, phone)	values ( 99, '9999')\p\g## This should fail because of the non-unique key value#insert into test (name, age, phone)	values ('Bambi', 26, '(075) Home_Number')\p\g## Keyed lookup#select phone from test where name = 'Bambi'\p\gselect * from test \p\g## Paul's birthday :-)#update test set age = 26 where name = 'paulp'\p\gselect * from test \p\g## Non-key passed lookup#select * from test where phone = '(075) 951412'\p\gselect * from test where name like '%am%'\p\g## Do a join#select test2.name, test.phone	from test2,test	where test2.user = test.name\p\g## Try a sorted one#select test2.name, test.phone	from test2,test	where test2.user = test.name	order by test2.name \p\g

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -