Topic profile page for Primary Key.
This page has aggregated data from forum posts, threads, listings, online discussions, newsgroups, messageboards, and other online sources which contain user generated content for the term: Primary Key.
Topic "Primary key" was discussed 13,319 times on 455 sites in last 3 months
Started 23 hours, 3 minutes ago (2009-11-09 02:26:00)
by srinandan..
I am very new to the linq to sql getting proble when I am tryig to insert the record in a table as the table do not have any primary key. Thanks Sri...
Started 3 days, 12 hours ago (2009-11-06 13:14:00)
by 2.q.w.e.r.t.y
Hi all, We use DB2 9.7 @ Windows XP. The table design: It's an MDC Table with 2 dimensions (ORGANIZE BY DIMENSIONS (Country,Year)) and 10 further columns. The table is marked as volatile. Each record has an ID column - that is a GUID (128 Bit value) Each ID value will be generated from an external application. The ID column is defined as CHAR(16) FOR BIT DATA ...
Started 4 days, 8 hours ago (2009-11-05 16:40:00)
by ryguy72
I am having a heck of a time assigning a PK to a Table. In Access, I have the PK set, and I import into SQL Server. When the data is imported, the PK is gone (looking in Design view). So I go into Design view. The PK is called ID. The data type for the ID Field is int, and the Allow Nulls is unchecked. I right click to assign a PK, then close the window and I get a ...
Started 4 days, 12 hours ago (2009-11-05 12:36:00)
by cat_ca
Hi there: I am having a question on building a report model... I was asked to build a model based on a data source view. In this data source view, there is only one table and this table has no primary keys, basically it's a fact table... I tried to build a model and deploy to the report server but SSRS said the table has no primary keys.... My question is that is it possible to build a ...
Started 5 days, 8 hours ago (2009-11-04 16:45:00)
by JeebsUK
Hi all, I'm trying to create a database table for a module and this table needs to use a text primary key. When I go to create the table it complains that I haven't specified a length, but I'm not 100% sure how to do on a key, can someone help?
Started 6 days, 1 hour ago (2009-11-04 00:10:00)
by yogeshyl
I have two tables in database namely CM_BOM and CM_BOM_ITEM. The table columns are as follows : In CM_BOM table CR_ID CR_BOM_CODE CR_BOM_NAME CR_FG_CODE CR_ID is primary key Trigger to insert primary key data is as follows : CREATE OR REPLACE TRIGGER COSTMAN."CM_BOM_T1" BEFORE INSERT ON "CM_BOM" FOR EACH ROW DECLARE L_ID NUMBER; BEGIN...
Started 6 days, 8 hours ago (2009-11-03 17:10:00)
by Larry C
I need to update an ID# in a table that has been indexed on ID# (and two other columns) using the indextype is ctxsys.context method. Oracle 10g is throwing the following errors: ORA-20000 "failed in the execution of the ODCINDEXUPDATE routine" DRG-50857 "oracle error in textindexmethods.ODCIndexUpdate ORA-20000 "Oracle Text error: DRG-10602 "...
Started 6 days, 9 hours ago (2009-11-03 15:49:00)
by literacyteacher
I have a Book Collection Database with three tables: Book Collection Book Reviews Leveled The Primary Key is letters (A1, A2, etc). I would like to change it to an autonumber. I about 50 records in the tables. Is there an easy way to update the primary key to an autonumber to all the tables; so doesn't ruin the information? Thanks SD
Started 1 week ago (2009-11-02 21:33:00)
by Teacher1234
I have a Book Collection Database with three tables: Book Collection Book Reviews Leveled The Primary Key is letters (A1, A2, etc). I would like to change it to an autonumber. I about 50 records in the tables. Is there an easy way to update the primary key to an autonumber to all the tables; so doesn't ruin the information? Thanks SD
Started 1 week ago (2009-11-02 18:13:00)
by Lucky A
This is an Oracle dababase 10.2.0.4 on solaris 10. I want to remove the primary keys from specific tables on certain named columns. Also I want to drop the specific named columns from the table. I will appreciate suggestions as to the best possible approach. Thanks, Lucky
Hi Guys, Just some advice on how to create a 'compound primary key' in slq2005 please My scheme is currently: CREATE TABLE [dbo].[DS_Shipment]( [shipmentID] [int] IDENTITY(1,1) NOT NULL, [invoiceID] [int] NULL, [shipmentdate] [smalldatetime] NULL, [shipcode] [nchar](10) NULL, [notes] [nvarchar](255) NULL, [trackingnumber] [nvarchar](20) NULL, CONSTRAINT [PK_DS_Shipment] PRIMARY KEY ...
Started 1 week, 1 day ago (2009-11-02 00:33:00)
by lez
Hi Guys, Just some advice on how to create a 'compound primary key' in slq2005 please My scheme is currently: CREATE TABLE [dbo].[DS_Shipment]( [shipmentID] [int] IDENTITY(1,1) NOT NULL, [invoiceID] [int] NULL, [shipmentdate] [smalldatetime] NULL, [shipcode] [nchar](10) NULL, [notes] [nvarchar](255) NULL, [...
Started 3 days, 10 hours ago (2009-11-06 14:37:00)
by ryguy72
You are totally right, Tibork. I went here: Tools / Options / Designers / Table and Database Designers Made the change and everything works fine now. Why is that feature automatically enabled? What does it protect you from? Thanks for the help! Ryan--
Started 2 days, 16 hours ago (2009-11-07 09:01:00)
by dick scherrer
Hello, Now would probably be a good time to correct the duplicates. Even when the new feature is available, the data will prevent a successful CREATE. . . (See the info from GuyC above).
Started 1 day, 21 hours ago (2009-11-08 04:14:00)
by user11928652
Hi Andy, Thanks a lot. But my problem is i need to make this varchar primary field editable. Is there any provision in tabular form for that ? Or is there any other solution for this. Please help, Thanks Jeev
Started 6 days, 1 hour ago (2009-11-04 00:21:00)
by Toon Koppelaars
In your code where you perform the insert into the parent table, you can use the RETURNING clause to receive the primary key value that the trigger on the parent table has assigned to the parent-row that was just inserted. insert into parent_table(....) values(....) returning CR_ID into some_local_variable; Then use this value when you insert the...
Check business requirement one more time... If sure... go and ask again... Test it... Test it... Test it... Drop PKs - Research alter table drop constraint to get rid of PK Drop columns - You should also get rid of all indexes referencing columns you want to drop - I would create new tables, like CTAS
Started 5 days, 20 hours ago (2009-11-04 05:26:00)
by shajju
Hi Please advise if the following is not possible and why? First ALTER TABLE USLM DROP CONSTRAINT USLM_PK; Then to add the desired primary key constraint. ALTER TABLE USLM ADD (CONSTRAINT USLM_PK PRIMARY KEY(DATETIME, MSC,LOCATION_AREA_CODE) USING INDEX LOCAL TABLESPACE SIE_USLM_I; Thanks.
Started 6 days, 19 hours ago (2009-11-03 05:51:00)
by SkipVought
Hi, Please post MS Access questions in one of the MANY MS Access Forums like forum700: Microsoft: Access Tables and Relationships . Skip, Just traded in my old subtlety... for a NUANCE!