简体   繁体   English

OrientDB:如何使用SQL创建唯一的属性?

[英]OrientDB: How can I create a property unique using SQL?

I have a little question for you, I don't know how create a property UNIQUE. 我有一个问题要问您,我不知道如何创建属性UNIQUE。 I know the SQL command for create a property, but don't know how do this UNIQUE. 我知道用于创建属性的SQL命令,但是不知道如何执行此UNIQUE。

And I can't use the app studio of OrientDB (would be most easy for me but...) 而且我不能使用OrientDB的应用程序工作室(对我来说最容易,但是...)

This is the command that I know: 这是我知道的命令:

"CREATE PROPERTY user.name STRING"

Thanks in advance. 提前致谢。

You can create index on this particular property. 您可以在此特定属性上创建索引。

CREATE INDEX user.name UNIQUE

Take a look here: Console - CREATE INDEX 在这里看看: 控制台-CREATE INDEX

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Google App Engine上的python中创建唯一属性? - How do I create a unique property in python on google app engine? 如何使用Orientdb和Flask将多个记录传递给graphql? - How can I pass to graphql more than one record using Orientdb and Flask? 如何根据另一列中的值创建唯一 ID - How can I create unique id based on the value in the other column 如何创建唯一密钥对词典的字典? - How can I create a dictionary of dictionaries of Unique Key Pairs? 如何在python中创建非唯一浏览按钮? - How can I create a non-unique browse button in python? 如何使用 pandas 或 sql 获得唯一计数? - How do I get the unique counts using pandas or sql? 如何使用Python CouchDb库的Create或Save方法将现有属性用作doc_id? - How can I use an existing property as the doc_id using Python CouchDb library Create or Save methods? 如何创建可与默认context_menu一起使用的唯一弹出菜单? - How can I create a unique popup menu that I can use alongside the default context_menu? 如何使用 for 循环根据唯一变量将数据帧子集化? - How can I subset into dataframes based on unique variable using a for loop? 如何使用 Jinja2 计算 Json 中唯一值的数量? - How can i count the no of unique values in a Json using Jinja2?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM