SQL Tips by Namwar Rizvi

June 29, 2007

Arrays in SQL Server 2005

Arrays are one of the most popular data structures for several solutions. Unfortunately, SQL Server does not support arrays in TSQL. As an alternative, you can use Table variable or temporary tables as a work around for arrays.
During my research about various possible approaches for array implementation, I found following article very interesting and informative, I will suggest to all my readers to read this.
Article is available here as Arrays in SQL Server 2005

Advertisements

2 Comments »

  1. hello sir,

    i want to create a table having column as given

    ——————————————
    Month Fee Progressive Fee
    —————————————-
    Jan 100 100
    Feb 150 250
    Mar 150 400

    i want to use this in sql05 or ms Access

    Comment by atul mishra — August 22, 2010 @ 7:20 AM | Reply

  2. You can create a table in SQL server

    Create Table Table_name
    (
    MonthName char(12) not null,
    Fee float/int,
    PreviousFee float/int
    )

    Note: If you want to store decimal number than use float otherwise int.

    Comment by Devendra — September 11, 2011 @ 7:14 AM | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: