SQL 2005 - List Primary Key Columns
Will list Table Name, Constraint name and Primary Key Column Name.
2012-06-29 (first published: 2008-03-20)
2,473 reads
Will list Table Name, Constraint name and Primary Key Column Name.
2012-06-29 (first published: 2008-03-20)
2,473 reads
This month’s invite is from Erik Darling, who invites you to make a video...
By Steve Jones
This month we have an interesting invite. Erik Darling is the host, and since...
By Chris Yates
In the bustling world of sports, leadership appears as a beacon of hope and...
Comments posted to this topic are about the item Part-Time DBAs
Comments posted to this topic are about the item The Long String
Comments posted to this topic are about the item Level 5 of the Stairway...
I have a table (dbo.beer) with this data:
BeerID | BeerName | brewer | beerdescription |
----------- | -------------------- | -------------------- | ---------------------------------------------------------------------------------- |
1 | Becks | Interbrew | Beck's is a German-style pilsner beer known for its golden color, full-bodied taste, and a crisp, clean finish with floral and fruity hop aromas, brewed according to the German purity law |
2 | Fat Tire | New Belgium | Toasty malt, gentle sweetness, flash of fresh hop bitterness. The malt and hops are perfectly balanced. |
3 | Mac n Jacks | Mac & Jack's Brewery | This beer erupts with a floral, hoppy taste, followed by a well rounded malty middle, finishing with a nicely organic hop flavor. Locally sourced two row grain and a blend of specialty malts give our amber its rich taste. |
4 | Alaskan Amber | Alaskan Brewing | Alaskan Brewing Amber Ale is an "alt" style beer, meaning it's fermented slowly and at colder temperatures, resulting in a well-balanced, richly malty, and long-lasting flavor profile with a clean, pleasing aftertaste. |
8 | Kirin | Kirin Brewing | Kirin Ichiban is a Lager-type beer, which means it is fermented at low temperatures and offers a light and refreshing texture with a smooth and balanced flavor. |
CREATE TABLE [dbo].[Beer] ( [BeerID] [int] NOT NULL IDENTITY(1, 1), [BeerName] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [brewer] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [beerdescription] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GOI run this code:
SET TEXTSIZE 20; SELECT b2.BeerName , b2.beerdescription FROM dbo.Beer AS b2; GOWhat is returned? See possible answers