Explain two methods for defining a primary key using SQL
What will be an ideal response?
A primary key may be defined by either the CREATE TABLE column description method or the CONSTRAINT phrase method. To create a primary key using the CREATE TABLE column description method, the primary key must be a single attribute. For the primary key attribute, the column property is specified to be PRIMARY KEY. There can be only one attribute specified as PRIMARY KEY with the CREATE TABLE column description method. This means that the creation of a composite key requires the use of the CONSTRAINT phrase method. Defining a primary key using the CONSTRAINT phrase requires that the column or columns that will serve as the primary key must have been defined as NOT NULL. Using the CONSTRAINT phrase method, the primary key is defined by adding a constraint to the table using a CONSTRAINT phrase after the table columns have been defined. The CONSTRAINT phrase names the column or columns that will be the table's primary key. The structure of the CONSTRAINT phrase is:
CONSTRAINT ConstraintName PRIMARY KEY (column names)
You might also like to view...
Which communication group seems to be most confrontational?
A. low context B. high context C. collective D. individual E. dominant
Which of the following is true regarding Statement of Financial Accounting Standards No. 144, "Accounting for the Impairment or Disposal of Long-Lived Assets," accounting and reporting standards for discontinued operations?
a. A component of a business always represents the same concept as a segment of a business used in reporting disaggregate information. b. A test for, and recognition of, an impairment loss would be necessary for a component that had not been sold by year-end if the fair value of the component was determined to be less than the book value. c. Discontinued operations should follow extraordinary items on the face of the income statement. d. The gain or loss recognized for reported in the discontinued operation section of the income statement includes only the gain or loss on disposal of the component and not the income or loss from operating the discontinued operation.
Lakeland, Inc manufactured 5,000 units during the month of March. They incurred direct materials cost of $100,000 and overhead cost of $40,000. If their per-unit prime cost was $26.00 per unit how much direct labor cost did they incur during March?
A) $20,000 B) $35,000 C) $90,000 D) $30,000
Differences in education level, experience, and culture or distractions such as noise, uncomfortable room temperature, and interruptions are examples of
a. feedback. b. interference. c. interception. d. decoding.