Something to watch out for when using sp_rename on Stored Procedures, Functions and Views
For those who don’t know, the stored procedure sp_rename allows you to change the name of a user-created object. Basically...
2013-02-11
2,338 reads
For those who don’t know, the stored procedure sp_rename allows you to change the name of a user-created object. Basically...
2013-02-11
2,338 reads
The other day one of the developers I work with gave me a script similar to this:
BEGIN TRAN
sp_rename 'tablename.columnname', 'newcolumnname'
COMMITHe...
2013-02-06
762 reads
We got a call last week about an application that was running slowly. The server was showing about 80% CPU...
2013-01-30
1,249 reads
Problem: You’ve added columns to the base table of one of your views, but the view isn’t reflecting the change.
Over...
2013-01-29 (first published: 2013-01-21)
3,838 reads
Most DBAs have at least some idea what the system databases are for. Master has the list of databases & logins,...
2013-01-28
929 reads
I just wanted to do a brief highlight of a handy little object property. For those of you who aren’t...
2013-01-23
1,464 reads
This isn’t really one of those features of SSMS that I’ve used a great deal. At least didn’t until recently....
2013-01-17 (first published: 2013-01-14)
3,285 reads
I just had the interesting task of finding the port number that one of the instances I deal with is...
2013-01-08
1,690 reads
Recently I received a security request and realized I wasn’t comfortable in my ability to script out the t-sql commands...
2013-01-07
839 reads
Most DBAs have seen those nice clear red errors in the results pane. And I’m sure most DBAs have noticed...
2012-12-27 (first published: 2012-12-19)
2,087 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