刚开始接触Oracle,完全是个菜鸟啦,刚建了个表,截了几个图,放上来权当给自己当个简单教程吧,呵呵
一、Oracle建表
1、用hr用户名登陆
[img]http://dl.iteye.com/upload/attachment/193406/0a89c357-68ae-342d-82f4-c9999a896dea.png[/img]
2、建表(使用自带的XE数据库,Oracle express edition 版本建数据库太麻烦了)
前提是hr这个用户具有见表的权限,可用系统用户登陆后修改hr的权限
[img]http://dl.iteye.com/upload/attachment/193408/30415dbc-1a7a-3d45-9353-ed17a25366ec.png[/img]
3、输入表名、列名。表名注意大小写,如果不在“保持大小写”前打钩,最后的表名会自动变成大写的,如果打钩了,将保持大小写不变,不过如果表名有小写字母,查询的时候就需要加双引号。
[img]http://dl.iteye.com/upload/attachment/193410/72c61e52-c319-3e54-b133-db0ee4412540.png[/img]
4、选择主键
[img]http://dl.iteye.com/upload/attachment/193412/0b19ed2e-90ab-3b4a-953f-9b05880b3277.png[/img]
5、创建结果
[img]http://dl.iteye.com/upload/attachment/193414/80e99350-f16a-3764-9131-1361542b73d7.png[/img]
6、输入数据,点击插入行
[img]http://dl.iteye.com/upload/attachment/193416/4721d176-5ed6-379e-a1ca-240d35b29707.png[/img]
[img]http://dl.iteye.com/upload/attachment/193420/35caecd2-3775-35e6-8981-1b43c930d5bd.png[/img]
[img]http://dl.iteye.com/upload/attachment/193422/d73860b3-7326-3f53-800e-72ec51658b3f.png[/img]
7、用SQL语句查询
[img]http://dl.iteye.com/upload/attachment/193424/54223922-d769-300e-9f39-cba7d8e8fe9c.png[/img]
若将表名改成test(一定要在“保持大小写”前打钩)
查询时:输入“select * from test”,则出错
[img]http://dl.iteye.com/upload/attachment/193426/c71b11a1-f37c-3c84-aaad-fdc927d46f99.png[/img]
查询时:输入select * from “test”,出现查询结果
[img]http://dl.iteye.com/upload/attachment/193428/6ab53e9d-bbda-3491-9fb4-d13deaf7f18c.png[/img]
一、Oracle建表
1、用hr用户名登陆
[img]http://dl.iteye.com/upload/attachment/193406/0a89c357-68ae-342d-82f4-c9999a896dea.png[/img]
2、建表(使用自带的XE数据库,Oracle express edition 版本建数据库太麻烦了)
前提是hr这个用户具有见表的权限,可用系统用户登陆后修改hr的权限
[img]http://dl.iteye.com/upload/attachment/193408/30415dbc-1a7a-3d45-9353-ed17a25366ec.png[/img]
3、输入表名、列名。表名注意大小写,如果不在“保持大小写”前打钩,最后的表名会自动变成大写的,如果打钩了,将保持大小写不变,不过如果表名有小写字母,查询的时候就需要加双引号。
[img]http://dl.iteye.com/upload/attachment/193410/72c61e52-c319-3e54-b133-db0ee4412540.png[/img]
4、选择主键
[img]http://dl.iteye.com/upload/attachment/193412/0b19ed2e-90ab-3b4a-953f-9b05880b3277.png[/img]
5、创建结果
[img]http://dl.iteye.com/upload/attachment/193414/80e99350-f16a-3764-9131-1361542b73d7.png[/img]
6、输入数据,点击插入行
[img]http://dl.iteye.com/upload/attachment/193416/4721d176-5ed6-379e-a1ca-240d35b29707.png[/img]
[img]http://dl.iteye.com/upload/attachment/193420/35caecd2-3775-35e6-8981-1b43c930d5bd.png[/img]
[img]http://dl.iteye.com/upload/attachment/193422/d73860b3-7326-3f53-800e-72ec51658b3f.png[/img]
7、用SQL语句查询
[img]http://dl.iteye.com/upload/attachment/193424/54223922-d769-300e-9f39-cba7d8e8fe9c.png[/img]
若将表名改成test(一定要在“保持大小写”前打钩)
查询时:输入“select * from test”,则出错
[img]http://dl.iteye.com/upload/attachment/193426/c71b11a1-f37c-3c84-aaad-fdc927d46f99.png[/img]
查询时:输入select * from “test”,出现查询结果
[img]http://dl.iteye.com/upload/attachment/193428/6ab53e9d-bbda-3491-9fb4-d13deaf7f18c.png[/img]