Novedades en SQL 2008: Cambios en TSQL

by 24. marzo 2009 21:10

SQL Server 2008 incorpora bastantes cambios, en esta ocasión veremos algunos referenciados a TSQL.

 

Declaración , inicialización e incremento de variables

Un cambio es el manejo de variables a nivel TSQL, ahora se asemeja cada día mas a lo que los desarrolladores estamos acostumbrados.

 

DECLARE @VAR INT = 4
SELECT @VAR
SET @VAR +=1 -- INCREMENTOS
SELECT @VAR     
 

Modificación de la sentencia INSERT

En versiones anteriores a 2008 si queríamos insertar mas de un registro debíamos usar tantos insert como registros necesitamos o bien insert en conjunto con Select.

Ahora además de esto, la sentencia insert nos permite en una sola instrucción insertar mas de un valor como se muestra a continuación

CREATE TABLE #T1 (ID INT)
GO
INSERT INTO #T1 VALUES (1),(2),(3),(4)
GO
SELECT * FROM #T1

 

Tags: , ,

Artículos

Comentarios

22/07/2009 0:31:09 #

I like your blog curently we are looking for a part time article writer would you be interested?

Christian Dior United States

13/08/2009 23:48:54 #

Tried to autotranslate you site not understand the writing any hope deutsch version?

Swiss Army Mens Alliance United States

14/08/2009 22:18:42 #

I would like to add your blog to my blogroll please tell me what anchor should I use?

Zodiac Mens Desert Master United States

15/08/2009 21:29:43 #

I am quite interesting in this topic hope you will elaborate more on it in future posts.

Michele Womens Mw2 Mini United States

16/08/2009 20:23:20 #

Tried to autotranslate you site not understand the writing any hope deutsch version?

Seiko Mens Stainless Steel United States

17/08/2009 19:50:06 #

I like your blog curently we are looking for a part time article writer would you be interested?

Kenneth Cole Unisexs Digital United States

18/08/2009 17:43:20 #

Please let me know if you are interested to work as article writer for me? I can offer $10/article.

Bulova Mens Square Chronograph United States

24/08/2009 17:21:23 #

I don�t usually reply to posts but I will in this case. I�ve been getting this very same problem with a new WordPress installation of mine. I�ve spent weeks calibrating and getting it ready when all of a sudden� I cannot delete any content. It�s a workaround that, although isn�t perfect, does the trick so thanks! I really hope this problem gets solved properly asap.

payday loans United States

26/08/2009 9:26:46 #

I like how you write.Are you interesting in a part time writer job?

Baume Mercier Classima United States

27/08/2009 7:20:17 #

I am quite interesting in this topic hope you will elaborate more on it in future posts.

Baume Mercier Classima United States

01/10/2009 4:58:43 #

Great overview. Your style of writing is really a joy to read.

Make Money Online United States

17/10/2009 10:57:08 #

I love it .

prada shoes United States

Maximiliano Damian Accotto