TEXT datatype
-
What is the TEXT datatype? How should it be used? Is it good or bad? I have to save a long text to the database. I don't know the size that should be saved. Is it better to use the TEXT dataType or the VARCHAR datatype.
-
What is the TEXT datatype? How should it be used? Is it good or bad? I have to save a long text to the database. I don't know the size that should be saved. Is it better to use the TEXT dataType or the VARCHAR datatype.
quiteSmart wrote:
What is the TEXT datatype?
A data type for storing text - up to 2Gb
quiteSmart wrote:
How should it be used?
When you have large amounts of text to store
quiteSmart wrote:
Is it good or bad?
Like anything it depends. If you pull the TEXT data out on each query whether it is required or not it is bad. If you are careful it is very good.
quiteSmart wrote:
I have to save a long text to the database. I don't know the size that should be saved. Is it better to use the TEXT dataType or the VARCHAR datatype.
If the text data is going to be over 8K a TEXT data type is your only option.
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
-
quiteSmart wrote:
What is the TEXT datatype?
A data type for storing text - up to 2Gb
quiteSmart wrote:
How should it be used?
When you have large amounts of text to store
quiteSmart wrote:
Is it good or bad?
Like anything it depends. If you pull the TEXT data out on each query whether it is required or not it is bad. If you are careful it is very good.
quiteSmart wrote:
I have to save a long text to the database. I don't know the size that should be saved. Is it better to use the TEXT dataType or the VARCHAR datatype.
If the text data is going to be over 8K a TEXT data type is your only option.
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
i have read an article that says that i can use the VARCHAR to arround 2 billion characters. They say in this article that i should write the dataType like this: VARCHAR(max) i am trying it but it doesn't work. the link for the article is this:here One more question concerning the TEXT dataType, Does it have any problems concerning the storage capacity? or Is it like the varchar? meaning that it only takes the space it needs for saving not more? Thanks for the reply
-
i have read an article that says that i can use the VARCHAR to arround 2 billion characters. They say in this article that i should write the dataType like this: VARCHAR(max) i am trying it but it doesn't work. the link for the article is this:here One more question concerning the TEXT dataType, Does it have any problems concerning the storage capacity? or Is it like the varchar? meaning that it only takes the space it needs for saving not more? Thanks for the reply
Which version of SQL Server are you using?
-
Which version of SQL Server are you using?
andyharman wrote:
Which version of SQL Server are you using?
Microsoft SQL Server Management Studio Express 9.00.2047.00
-
i have read an article that says that i can use the VARCHAR to arround 2 billion characters. They say in this article that i should write the dataType like this: VARCHAR(max) i am trying it but it doesn't work. the link for the article is this:here One more question concerning the TEXT dataType, Does it have any problems concerning the storage capacity? or Is it like the varchar? meaning that it only takes the space it needs for saving not more? Thanks for the reply
quiteSmart wrote:
i have read an article that says that i can use the VARCHAR to arround 2 billion characters.
If you are using SQL Server 2005 (I forgot about that - I'm not yet using SQL Server 2005)
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
-
andyharman wrote:
Which version of SQL Server are you using?
Microsoft SQL Server Management Studio Express 9.00.2047.00
quiteSmart wrote:
Microsoft SQL Server Management Studio Express 9.00.2047.00
That is the IDE, not the version of the database engine. If you are using this IDE and it is the only version of SQL Server you have installed then you are using SQL Server 2005
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
-
quiteSmart wrote:
Microsoft SQL Server Management Studio Express 9.00.2047.00
That is the IDE, not the version of the database engine. If you are using this IDE and it is the only version of SQL Server you have installed then you are using SQL Server 2005
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
yes it is SQL 2005
-
yes it is SQL 2005
I don't have access to SQL-Server 2005 from this machine, but you should be able to create tables like:
create table MyTable( Id int identity(1,1) not null, MyBigColumn varchar(max) null )
I believe that Microsoft are recommending use of "varchar(max)" instead of the "text" data-type. Regards Andy
-
I don't have access to SQL-Server 2005 from this machine, but you should be able to create tables like:
create table MyTable( Id int identity(1,1) not null, MyBigColumn varchar(max) null )
I believe that Microsoft are recommending use of "varchar(max)" instead of the "text" data-type. Regards Andy
andyharman wrote:
MyBigColumn varchar(max) null
I read on MSDN that i can do this, but when trying it; it doesn't work i don't have any clue why that is happening
-
andyharman wrote:
MyBigColumn varchar(max) null
I read on MSDN that i can do this, but when trying it; it doesn't work i don't have any clue why that is happening
What error message do you get?
-
What error message do you get?
andyharman wrote:
What error message do you get?
Syntax Error newr 'max'
-
What is the TEXT datatype? How should it be used? Is it good or bad? I have to save a long text to the database. I don't know the size that should be saved. Is it better to use the TEXT dataType or the VARCHAR datatype.
BLOB data is stored separately from the record in the underlying data structure by the RDBMS
File Not Found