1
  • Make SQL Server primary key AUTO INCREMENT

    In SQL Server, I have a database with a table and the primary key is titled 'ID'. Is there a way I can make it AUTO INCREMENT? Thanks so much.

    ITKE436,030 pointsBadges:
  • Error In SQL SERVER DataBase

    am trying to insert four varchar(50) values in a table which is with a primarykey column id_number. i didnt check : "True" to the null field . so it should not allow null values in table. but while am trying . it allows null values. including primary key column. how is possible ? pls help me. i am...

    SrimanBenivolent5 pointsBadges:
  • How do I use primary keys in SQL server?

    I have a table called course,and course_id is primary key in this table. I created another table subject.I mapped these 2 tables by course_id as foreign key,I  created another table teacher,i want to map this with subject, only subject_id to teacher_id mapping is required,how i mapp this,can i...

    Shamu75 pointsBadges:
  • ORA-01031 Insufficient privileges

    I am trying to generate FK on table in schema A, which is the reference of PK on another table in schema B. The owner of schema A is also a DBA. It gives an error ORA-01031 Insufficient privillages

    SRDBA5 pointsBadges:
  • A report that works in Crystal Reports client does not work in CMC

    Oracle10g / Crystal Reports XIR2 / Central Management Console (CMC) Our Crystal Report fetches the last one week's data from a big table. This report runs weekly, once. To tune this report, we created another table to maintain the primary key value(numeric sequence), of the latest viewed record....

    Alienzaway5 pointsBadges:
  • Plausability of natural key as primary key

    If you have a field in a table that is a natural key and meets all the criteria for a Primary key, is it advisable to use that natural key as your Primary? Or is it a better idea to assign a surrogate key (i.e. autonumber for TrainingProgramID instead of using TrainingProgramName)? Thanks in...

    Bdpowell25 pointsBadges:
  • Microsoft Access linking

    Hi, I have a database in access which has a main table and a products table. They are linked by a customer I.D. field (Primary Key). I have 2 forms one is the customer form and one a products form there is a button to open the products form from the customer form. I would like to be able to open...

    Donb5225 pointsBadges:
  • Adding an index on fields in a SQL Server table

    I have a massive customer table. The ID is the primary key and thus SQL Server makes a clustered index on that. There is no other index on the table. Can I add an index on fields like age, country and gender to make the results faster?

    SQL Server Ask the Experts2,585 pointsBadges:
  • designing indexes

    I have a question regarding database design. Lets assume that there is a table with 10 columns. I don't have any single column which I can choose as candidate for Primary key. Though, combination of 5 columns can uniquely identify records. Here, I created an identity column as a PK and added UNIQUE...

    Sqloholic25 pointsBadges:
  • Writing a specific query involving primary keys in SQL

    I need to write a query in SQL that will get the fifth-from-last record from my database when either a primary key is defined or no primary at all is defined. How would this query look?

    SQL Server Ask the Experts2,585 pointsBadges:
  • Overlapping data on a merge replication between three SQL Servers

    We have a merge replication between our three SQL servers at three different locations. One is the publisher and two are subscribers, and we have a primary key on a table (a unique field with is auto-incremental by one). On the publisher’s server, if the user creates a new order, the table...

    SQL Server Ask the Experts2,585 pointsBadges:
  • Including a primary key in a nonclustered index in SQL Server 2005

    The query optimizer for SQL Server 2005 is suggesting that we include a primary key as part of a nonclustered index. Is it OK to include that to increase SQL performance?

    SQL Server Ask the Experts2,585 pointsBadges:
  • Oracle Application Express Item

    I have two tables with parent-child relationship. Is there a way to automatically populate the foreign key field of the child table with the exact data from the primary key of the parent table?

    Rwy265 pointsBadges:
1

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following