Most voted "varchar" questions
A *varchar* or field character of variable size is a set of character data of undetermined length. The tag can be used for any database that has a field with these characteristics and is not limited to a specific implementation.
Learn more…18 questions
Sort by count of
-
21
votes3
answers23896
viewsDifference between type text and type varchar in SQL Server
What’s the difference of using text instead of type varchar to store information in the database? Is there a performance problem? Because I have a table in the database that has a column text and…
-
10
votes3
answers3229
viewsFind certain dates in VARCHAR field in SQL (Mysql)
I have the following condition: WHERE sv_users.userDataNascimento LIKE '%95%'; And this condition searches a date (11/12/1995), of the kind VARCHAR and not Timestamp, one year ending with the…
-
7
votes4
answers4319
viewsString concatenation in SQL
I perform a query in a table in my Mysql database that returns the following fields to me: usuarioId nome sobrenome idade sexo escolaridade modeloNome hora Follow the sql below: SELECT…
-
4
votes1
answer315
viewsSQL Server CHAR and VARCHAR
I understood the difference between CHAR and VARCHAR. If I want to insert in a field VARCHAR(10) the word 'house', that word in the bank will take 4 bytes. If I want to insert in a field CHAR(10)…
-
4
votes2
answers728
viewsField size takes total defined value?
If the maximum size of a field of type VARCHAR is 65535 (ocupa 65KB), it will always take up a space of 65KB in the database for each line even if I put less text in it? EXAMPLE: a field…
-
2
votes1
answer335
viewsIt makes a difference to use LONGTEXT instead of VARCHAR(255)
I wonder if using LONGTEXT instead of VARCHAR(255) would cause more "lag", which would have a greater advantage ??
-
2
votes2
answers2434
viewsIn terms of performance, "Character Varying" or "text" in Postgresql?
Before posting this question I scoured the internet to know the differences and performance of each type and I came to the conclusion that I should discuss a little more on this subject here with…
-
2
votes2
answers88
viewsVARCHAR FOR NUMBER
I have a column (value) in MYSQL in varchar, and in it I store whole or broken numbers, like this: 1.1 2 3.99 4.2 2.345 In the query I need to know when a number is (greater or equal) and (less or…
-
1
votes1
answer1810
viewsHow to convert dates into varchar to date in SQL `Firebird`?
How to convert dates into sweep for date? I’m having difficulties in performing searches between dates, due to this discrepancy in the database where I perform the query. When I enter my line of…
-
1
votes1
answer74
viewsHow to determine the type of data to use in this flexible case?
The project consists of a database for RPG sheets (D&D and the like). It was like this: Database record sheet Tables character system raccoon class attribute personagem_attribute Relationships…
-
1
votes1
answer1533
viewsHow to convert a VARCHAR(30) FIELD WITH SPECIAL CHARACTERS TO NUMBER?
I have a seemingly simple question, but I’ve been racking my brain for a few hours, so I decided to ask for help. When executing the below query it normally executes. Select campo1, campo2 from…
-
0
votes1
answer361
viewsImport CSV files to Mysql Workbench
I have a file .csv which contains in columns (vertically): Product.1 (line1) Product.2 (Linha2) But when I do this query: use test; LOAD DATA LOCAL INFILE 'local' INTO TABLE tabela1; Always give me…
-
0
votes1
answer581
viewsField help to save a link
I need to save a link in the database, which in the case is Mysql, I was using VARCHAR(255), but I easily noticed some of the links stored exceeded 255 characters, what kind of data can I use in the…
-
0
votes0
answers673
viewsChange data type varchar to int
Is there a problem changing the data type from varchar to int in mysql? I have a spreadsheet with some items that were inserted as varchar, all are numbers. The problem is that I need to do a search…
-
0
votes0
answers133
viewsConvert Varchar column to Date without losing the data
Before the database was saving the date in a varchar field and in the Brazilian standard (dd/mm/YYYY), then I modified the values using the code below: UPDATE tabela SET coluna=…
-
0
votes0
answers173
viewsBest Way to Store Varchar(MAX)
I’m working on an EAD project where I work. There will be simulations with many questions and their respective answers. These questions and some answers are usually quite large and I am storing them…
-
0
votes1
answer106
viewsHow to return a Mysql query with specific characters within each cell?
If in my column there is a field in this format: 181202272, (a varchar of 10 characters), I would like to return in my query through a SELECT by Mysql in this way: 18:12:02.272 //Nos dois primeiros…
-
-1
votes1
answer1691
viewsConvert LONG column to VARCHAR2 in ORACLE - problem related to LONG column value size relative to VARCHAR2
CREATE OR REPLACE FUNCTION PRC_HAM_CONVT_LONG_VARCHAR2 ( p_owner VARCHAR2, p_tabela VARCHAR2, p_coluna VARCHAR2, p_rowid UROWID )RETURN VARCHAR2 IS v_cursor INTEGER; --cursor v_length INTEGER;…