问题描述
我尝试做一些与对象关系数据库有关的工作.我有Oracle Express和SQL Developer.一切正常.
I try to do some stuff wie object relational Databases. I have Oracle Express and the SQL Developer. Everything works fine.
我可以创建自己的自定义类型并插入一些行.问题是它不会正确显示.我认为通常是因为它们应该在列中显示对象/类型...
I can create my own, custom types and insert some rows. The problem is that it would not be display right. I think it is normally because they should be display object/types in a column...
有没有一种方法可以在列中显示对象?
Is there a solution to display the objects in the columns?
这是我的代码.p.s.我来自德国. ANSCHRIFT_T是一种地址类型,其名称为树名(Strasse)和门牌号(Hausnr).
This is my code.p.s. i am from germany. ANSCHRIFT_T is a type for an address with name of the tress (Strasse) and house number (Hausnr).
CREATE OR REPLACE TYPE ANSCHRIFT_T AS OBJECT (STRASSE CHAR(12), HAUSNR CHAR(3));
CREATE TABLE VERTRETER(V_NR NUMBER(4) PRIMARY KEY, ANSCHRIFT ANSCHRIFT_T);
INSERT INTO VERTRETER VALUES (1, ANSCHRIFT_T('TESTWEG','14'));
INSERT INTO VERTRETER VALUES (2, ANSCHRIFT_T('BLA BLA WEG', '25'));
SELECT V_NR, ANSCHRIFT FROM VERTRETER;
但是输出就是这样:
推荐答案
双击该值.您会看到自己的数据.
Double click on the value. You'll see your data.
或者,您可以告诉SQL Developer默认显示这些值.
Or, you can tell SQL Developer to show those values by default.
首选项>高级显示结构
然后再次运行查询.
[
这篇关于或Oracle Express/SQL Developer中的数据库/类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!