ChinaUnix.net
相关文章推荐:

mysql range primary key

mysqlprimary key 和unique key 的区别 primary key与Unique key primary key 与Unique key都是唯一性约束。但二者有很大的区别: 1、primary key的1个或多个列必须为NOT NULL,如果列为NULL,在增加primary key时,列自动更改为NOT NULL。而UNIQUE key 对列没有此要求。 2、一个表只能有一个primary key,但可以有多个UNIQUE key。 下面以 测试 说明: SQL> create table t (a int,b int,c int,d int); Table created. S...

by militala - MySQL文档中心 - 2009-01-01 15:12:50 阅读(7506) 回复(0)

相关讨论

mysqlprimary keykey的区别?

by wubai - PHP - 2004-02-18 16:42:31 阅读(907) 回复(0)

Fedora9 用mysql官方网站下载的安装包 安装mysql 安装之前已经完全删除旧有的安装 但是出现了这个提示 [root@localhost]# rpm -i /home/qq/Download/mysql-server-5.1.26-0.glibc23.i386.rpm ERROR: 1062 Duplicate entry 'localhost-' for key 'primary' 080823 17:07:11 [ERROR] Aborting 080823 17:07:11 [Note] /usr/sbin/mysqld: Shutdown complete ............. 我到百度 google 都搜索过 在mysql官方论坛上没有答...

by QQ373381050 - MySQL - 2008-08-26 12:26:52 阅读(5822) 回复(6)

mysql有聚集和非聚集这一说吗? unique和index都可以建多个,应该是非聚集索引吧,主键只能一个,是聚集索引? 还是mysql就没有这么一分呢

by angel1949 - MySQL - 2008-05-05 16:10:04 阅读(3763) 回复(3)

mysql中的语句如下: CREATE TABLE A(name varchar(2) not null,age varchar(2) not null,user varchar(3),CONSTRAINT SYS_PK_A primary key(name,age)); 请问CONSTRAINT SYS_PK_A primary key(name,age)是什么意思呢? 还有SYS_PK_A是什么意思? 如果我要换成oracle下又该如何改呢? 谢谢! [ 本帖最后由 richardzhang 于 2008-4-25 13:59 编辑 ]

by richardzhang - MySQL - 2008-04-25 16:05:26 阅读(3240) 回复(2)

一个表,想把原来的primary key删掉,换成其他的, 如何在不drop表的前提下换主键

by susanita - Sybase - 2006-02-10 07:11:34 阅读(1672) 回复(1)

我做的是实体bean加sessionbean不知道为什么报这个错误! java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: null; CausedByException is: A CMP field that is a member of the primary key can only be set in ejbCreate [EJB 2.0 Spec. 10.3.5].; CausedByException is: A CMP field ...

by siqiabc - Java - 2005-10-21 14:15:31 阅读(1730) 回复(3)

I want to recreate normal table to partition tables for the data is very large. But I can't create or add partition primary key to a partition table. My table have only ONE column as PK and the partition key is defferent from index column. I add PK dierectly to the table but it's not partitioned. I only find so little meterial about it in metalink, and the meterial cant resole the problem. Pls hel...

by pearaep - Oracle - 2003-05-13 15:34:52 阅读(1881) 回复(3)

00:00000:00035:2006/08/10 09:13:38.29 server Deadlock Id 47 detected Deadlock Id 47: detected. 1 deadlock chain(s) involved. Deadlock Id 47: Process (Familyid 115, 115) (suid 7) was executing a INSERT command at line 1. SQL Text: ^A ^D1100^D1100^A ^A1^A ^A ^D划款^A ^A ^A ^A ^A0 Deadlock Id 47: Process (Familyid 35, 35) (suid 7) was executing a INSERT command at line 1. SQL Text: ^A0^A ^H70000.0...

by littlezgj - Sybase - 2006-08-11 17:14:06 阅读(2033) 回复(5)

我使用alter table 修改表结构,同时增加constraint,请问如何将这个constraint drop 掉呢? 我无法找到constraint的名字?

by aaagggg - Informix - 2005-08-18 11:49:14 阅读(1715) 回复(1)

对于已经存在的table 在 MSSQL中建立primary key的语法: ALTER TABLE Table_name ADD CONSTRAINT CONSTRAINT_name primary key (Column_name) 能否在Oracle下类似的SQL语句? 顺便告知如何drop 此primary key.类似drop index

by sea01 - Oracle - 2004-12-24 17:41:42 阅读(2040) 回复(2)