Tag: varchar
Posts of Tag: varchar
  1. TEXT vs VARCHAR in InnoDB MySQL 5.5. When to use each one

    What are the main differences between text and varchar in InnoDB storage engine at MySQL 5.5? Is text or varchar(5000) used if we are talking about a variable text field of not more than 5000 chars? ...Learn More
  2. SQL: long varchar and impact on peformance

    I am working with a database which is very slow. We use ASP.NET to access/populate the database. I am new to the database and I found that some of the thing are not properly done. I want to get a more knowledge...Learn More
  3. Format String as Date in SQL?

    I have this stored Proc: ALTER Procedure [dbo].[GetWebinars] ( @GroupingCode varchar(max) = 'AVM', @ItemNumber varchar(max) out, @Title varchar(max) out, @SubTitle varchar(max) out, @ShortDe...Learn More
  4. SQL data type that automatically sets to field length of value

    Does such a thing exist or are you always required to set the max field length manually? We have a varchar field in our database where the length of the value can be anything from 0 all the way to 800 or grea...Learn More
  5. SQL BETWEEN for text vs numeric values

    BETWEEN is used used in a WHERE clause to select a range of data between two values. If I am correct whether the range's endpoint are excluded or not is DBMS specific. What I can not understand in the following...Learn More
  6. MySQL - trim VARCHAR values?

    I have simple table like this: id (AUTO_INC) | text (VARCHAR 255) 1 hey! is it possible to trim all the text values to remove all empty or hidden spaces in the field? Cause if you can se...Learn More
  7. varchar(max) is truncating the string when set in a variable

    I'm trying to print a dynamic query but what's happening is while printing the query the characters are getting truncated. declare @sql varchar(max) set @sql = cast('select*from.................length is huge'...Learn More
  8. Cast different parts of a varchar into a date time, SQL

    I have a varchar that is an 8 digit number and I need to convert to a datetime. The production number is an automatically generated number from when the time the order was placed. For example, the production nu...Learn More