Tags: http using ar strong for data SP art onAfter years of controversy, Microsoft finally cut the date-time data type, adding 4 new date-time data types in one breath in the new version of SQL Server 2008, including:
Date: A pure date data type.
Time: A pure temporal data type.
DateTime2: A new datetime type that mentions precision to 100 nanose
Tags: ar sp on data bs time as nbsp sqlThe sql_variant type is used to store various data types that are supported in SQL Server.For sql_variant comparisons, the SQL Server data type hierarchy sequence is divided into multiple data type systems, and thesql_variant data type is at the top of the list of data type hierar
The varchar (max), nvarchar (max), and varbinary (max) data types are added to SQL Server 2005.
Shard data type (large-value data types) , Marked with the Max specifier. The varchar (max), nvarchar (max), and varbinary (max) data types correspond to
type in Java
SQL Server Type
JDBC Type (java.sql.Types)
Java Language Types
bigint
BIGINT
Long
TimestampBinary
BINARY
Byte[]
Bit
BIT
Boolean
Char
CHAR
String
DecimalMoneySmallMoney
DECIMAL
Java.math.BigDecimal
) floating precision digital data from -1.79e + 308 to 1.79E + 308. The parameter n indicates whether the field holds 4 bytes or 8 bytes. Float (24) holds 4 bytes, while float (53) holds 8 bytes. The default value for N is 53. 4 or 8 bytesReal floating precision digital data from -3.40e + 38 to 3.40E + 38. 4 bytesDate typeDateTime is from January 1, 1753 to December 31, 9999 with a precision of 3.33 milliseconds. 8 bytesDateTime2 from January 1, 1753 to December 31, 9999, the accuracy is 100 nan
a master data file, and the file name extension of the master data file is. mdf.• Secondary (secondary) data files: All other data files except the master data file are secondary data files, some databases may not contain any secondary data files, and some databases contain multiple secondary data files, and the file name extension for secondary data files is. ndf.• Transaction log file: Contains information that restores all transaction logs for the database. Each database must have at least o
bigint integer data (all numbers) from -2^63 (-9223372036854775808) to 2^63-1 (9223372036854775807). The storage size is 8 bytes.
int from -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647) of integer data (all numbers). The storage size is 4 bytes. The SQL-92 synonym for int is integer.
smallint integer data from -2^15 (-32,768) to 2^15-1 (32,767). The storage size is 2 bytes.
Tinyint the integer data from 0 to 255. The storage size is 1 bytes.
Sup
, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
Alter table [dbo]. [Contact] add default (getdate () FOR [Created]
GO
Then create a user-defined table Type InsertContacts
USE [Contacting]
GO
Create type [dbo]. [ContactStruct] as table (
[ContactID] [uniqueidentifier] not null,
[FirstName] [nvarchar] (80) not null,
[LastName] [nvarchar] (80) not null,
[Email] [nvarchar] (80) not null,
[Phone] [varchar] (25) not null,
PRIM
DateTime and smalldatetime represents the date and time data type for the date and time of day. Microsoft SQL Server stores values for datetime data types within two 4-byte integers. The first 4 bytes stores the number of days before or after base date (i.e. January 1, 1900). The base date is the system reference date. DateTime values older than January 1, 1753
I. Base and management of the database:Persistence Technology: Memory--FILE----database (most commonly used, popular)1. Database:1. Store massive data (P) Big data, cloud computing2. Security3. Easy to manage and operate (DDL,DML.TCL ...)4. Sharing of data (concurrent access)2. Product Brand: (relational database)Oracle: Oracle (SUN:JAVA) ordbm (object-oriented relational database)DB2:IBM (RDB)Sybase:sybaseMysql:sybase Free (* * *)Sqlserver:ms (high cost performance, large customer volume) (* *)
Tags: style blog http color os using AR strong dataWe know that the datetime type in this SQL Server database is a data type that is often used in database application development, and the C # language also has a DateTime type, although both are used to describe time, but their default values are different, which must be noted in the development process , it is a waste of time to deal with the relationship
Label:Are exact data types, the first two can define their own lengths and decimal digits, and Money's definition is equivalent to Numric (19,4) Numeric (10,2)Indicates that the maximum can be 10 digits, but the 10 digits have 2 digits that are decimals such as:12345678.12 NumericFunctionally equivalent to decimal. The money type of SQL Server is actually a decim
0 to 255.
Bit:1 or 0 of integer data.
(4) Decimal and numeric
The two types of data are equivalent. have two parameters: P (Precision) and S (scale). p Specifies the maximum number of decimal digits that can be stored to the left and right of the decimal point, and P must be a value from 1 to 38. s specifies the maximum number of decimal digits that can be stored to the right of the decimal point, and S must be a value between 0 and P, and the defaul
1. instance reproduction of four types of transaction concurrency problems in SQL Server Zhu Er (2006.3 reproduced please note the author) http://blog.csdn.net/netcoder/article/details/633153This articleArticleIt will use instances to reproduce four types of concurrency issues in database access, hoping that beginners
.
"Common", which represents time.
Binary
Binary
Byte[]
Represents fixed-length binary data with a maximum of 8,000 characters
varbinary (n)
Byte[]
Represents a variable-length binary data that stores up to 8,000 characters
varbinary (max)
Byte[]
Represents variable-length binary data with up to 2GB of storage
"Common", typically used to store comp
Objective
In the previous articles we explained the index of knowledge, this section we continue to explain the following content, short content, in-depth understanding.
Data type
SQL Server supports two types of character data, one is general and the other is Unicode. General data types include char and varchar,uni
(32,767.Tinyint: integer data from 0 to 255.Bit: an integer of 1 or 0.
(4) decimal and numericThe two data types are equivalent. There are two parameters: P (precision) and S (number of decimal places ). P specifies the maximum number of decimal digits that can be stored on the left and right of the decimal point. P must be a value ranging from 1 to 38. S specifies the maximum number of decimal digits that can be stored on the right of the decimal
.Tinyint: integer data from 0 to 255.Bit: an integer of 1 or 0.
(4)Decimal and numericThe two data types are equivalent. There are two parameters: P (precision) and S (number of decimal places ). P specifies the maximum number of decimal digits that can be stored on the left and right of the decimal point. P must be a value ranging from 1 to 38. S specifies the maximum number of decimal digits that can be stored on the right of the decimal point. s
PostgreSQL 8.1 Sensational release, I also intend to migrate some of the original SQL Server applications to PostgreSQL, the first need to migrate a table, then this must first understand the data types in the two database mapping relationship. Check out the PostgreSQL document specially made to the following table to treat you.Note: The money (currency) data typ
java.math.bigdecimal
numeric
numeric
numeric
numeric
other
java.lang.object
other
other
other
NBSP;OTHERNBSP;
real
java.lang.float
real
real
real
real
smallint
java.lang.integer
smallint
smallint
smallint
smallint
time
java.sql.time
time
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.