Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 I need a Tutorial on how to use DataTypes in T-SQL

Author  Topic 

ZarrinPour
Yak Posting Veteran

66 Posts

Posted - 2007-10-10 : 06:34:30
Hi all,
i'm looking for an article on how to use DataTypes of SQLServer in T-Sql script writing !!!?
As you know the Books-Online has limited example and i have trouble undertanding for example how to use Binary,varbinary Decimal,Float,real...in T-sql script

Could anyone showm me an instructive article on the net?
Thanks in advance.


spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-10 : 06:39:04
what exactly don't you understand?

you have a variable or a column that is of certain datatype. the type of the datatype is dependant on your busines requirements.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

ZarrinPour
Yak Posting Veteran

66 Posts

Posted - 2007-10-10 : 09:35:11
quote:
Originally posted by spirit1

what exactly don't you understand?

you have a variable or a column that is of certain datatype. the type of the datatype is dependant on your busines requirements.

_____________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com



Excuse me for my silly question
I just want a sample on how to set and assign value to diffrent datatypes.that's it.
Thanks spirit1 for your reply
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-10 : 09:47:43
declare @myVariable int
set @myVariable = 5

declare @myVariable varchar(50)
set @myVariable = 'some text i want to put here'


that's it... instead of int/varchar you can put any other datatype that is in sql server

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -