sql-types Questions
3
To persist I use Hibernate 6 and use on the entity:
@JdbcTypeCode(SqlTypes.JSON)
private String value;
When you save to the database, save wrapped in quotes and inside the json escape the quotes:
...
Middendorf asked 18/8, 2022 at 17:30
5
Solved
This sounds like a silly question, but I've noticed that in a lot of table designs for e-commerce related projects I almost always see decimal(19, 4) being used for currency.
Why the 4 on scale? W...
Strictly asked 5/12, 2014 at 22:21
3
Solved
I'm trying to change the datatype in a column in a table from Float (null) to Varchar(25) (null). The largest float in the current data is 12 digits, but more digits may have to be added in the fut...
Depressomotor asked 12/8, 2015 at 16:4
2
Solved
Sounds like a basic question but I couldn't seem to find it.
Is there a way to define in SQLite a column which will be a single bit?
5
I'm new to table-valued parameter in SQL Server 2008. I tried to make user-defined table with query
USE [DB_user]
GO
CREATE TYPE [dbo].[ApproveAddsIds] AS TABLE(
[Ids] [bigint] NULL
)
GO
When ...
Subclavian asked 2/1, 2014 at 11:36
5
Solved
How can I do this :
private decimal _SnachCount;
[Required]
[DataType("decimal(16 ,3)")]
public decimal SnachCount
{
get { return _SnachCount; }
set { _SnachCount = value; }
}
private de...
Alvarez asked 27/1, 2012 at 11:55
7
Solved
I want to create a varchar column in SQL that should contain N'guid' while guid is a generated GUID by .NET (Guid.NewGuid) - class System.Guid.
What is the length of the varchar I should expect fr...
Ilbert asked 9/6, 2009 at 4:44
8
Solved
I'm working under refactoring of database (SQL Server 2008) scheme and gather arguments to change NCHAR(1) columns (which keep Y|N values) to BIT. Everybody understand this is necessary and don't k...
Ulibarri asked 9/8, 2010 at 13:3
5
Solved
I just read that the VARCHAR(MAX) datatype (which can store close to 2GB of char data) is the recommended replacement for the TEXT datatype in SQL Server 2005 and Next SQL SERVER versions.
If I w...
Tibiotarsus asked 7/5, 2009 at 13:56
2
Solved
What's the difference between a function that returns TABLE vs SETOF records, all else equal.
CREATE FUNCTION events_by_type_1(text) RETURNS TABLE(id bigint, name text) AS $$
SELECT id, name FROM...
Handcrafted asked 15/3, 2014 at 12:43
2
Solved
Is there any way to create an implode routine in PL/SQL that takes any custom datatype as a parameter and concatenates its members, delimited by some specified string?
For example, say I've got th...
Beals asked 3/8, 2011 at 15:27
2
Solved
I am trying to convert queries like below to types so that I won't have to use GTT:
insert into my_gtt_table_1
(house, lname, fname, MI, fullname, dob)
(select house, lname, fname, MI, fullname, d...
3
Solved
If I don't care about less than seconds, what should be the recommended type to store my datetime values in sql-server 2005, is it datetime or smalldatetime or else?
Secund asked 29/11, 2009 at 1:10
2
Solved
When should I choose one or the other? What are the implications regarding space and (full-text) indexing?
BTW: I'm currently using SQL Server 2005 planing to upgrade to 2008 in the following mont...
Stoneham asked 6/9, 2008 at 2:31
1
© 2022 - 2024 — McMap. All rights reserved.