Tags: 9.png style attribute numeric expression str src code useThe SQL data type is a property that specifies the type of data for any object. In each column in SQL, variables and expressions have related data types.These data types are required when you create a table. Chooses a specific data
To operate SQL server data over the past two days, you need to set the time, minute, and second of a date field, that is, '2017-11-07 16:41:35. the 033 'is changed to '2017-11-07 00:00:00', so I checked the SQL syntax for datetime-type operations on the Internet and found that implementing this function is very simple.
SQL type
C # types
Bit
bool
tinyint
Byte
smallint
Short
Int
Int
bigint
Long
Real
Float
Float
Double
Money
Decimal
Datetime
Datetime
Char
String
varchar
String
NCha
Label:The following table lists the default mappings between the basic SQL Server, JDBC, and Java programming language data types:
SQL Server Type
JDBC Type (java.sql.Types)
Java Language Types
Label:
SQL SERVER type
C # type
Exact numbers
bigint
Integer data (all numbers) from -2^63 (-9223372036854775808) to 2^63-1 (9223372036854775807). The storage size is 8 bytes.About 90 billion, with less
Int64
Int
Integer data (all numbers) f
SQL Server Type
JDBC Type (java.sql.Types)
Java Language Types
bigint
BIGINT
Long
TimestampBinary
BINARY
Byte[]
Bit
BIT
Boolean
Char
CHAR
String
DecimalMon
(-9223372036854775808) to 2^63-1 (9223372036854775807). The storage size is 8 bytes.int (storage byte is 4 bytes)The values range from:Integer data (all numbers) from -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647). The storage size is 4 bytes. The SQL-92 synonymous word for int is integer.smallint (storage byte is 2 bytes)The values range from:Integer data from -2^15 (-32,768) to 2^15-1 (32,767).tinyint (storage byte is 1 bytes)Integer data from 12
approximately 2 billion bytes---------------------------------------------------(1) Binary data typeBinary data includes binary, Varbinary, and ImageBinary data types can be either fixed-length (binary) or variable-length.binary[(N)] is a fixed n-bit binary data. where n is the range of values from 1 to 8000. The size of its storage scenting is n + 4 bytes.varbinary[(N)] is a binary data of n-bit variable length. where n is the range of values from 1 to 8000. The size of its storage scenting is
The remarks type can be text, or ntext! Varchar cannot exceed 8000.
Ntext
The maximum length of Unicode data is (1,073,741,823) characters.
Text
Server
Code The maximum length of non-Unicode data in the Variable Length page is (2,147,483,647) characters.
if your remarks are smaller than 8000 bytes, you can use the varchar type. The access method is
data types for 1.SQL server
Data class is a property of data that represents the type of information that the data represents. Any computer language defines its own data type. Of course, different programming languages have different characteristics, the types of data defined and the names are more or less different.
1. SQL Server Data Type
The data class is a type of data attribute, indicating the type of information represented by the data. Any computer language defines its own data type. Of course, different programming languages have diffe
There is no single Boolean storage class in the SQLite database, and the Booean value is stored in integers 0 (false) and 1 (true), and by the time I practice, a Boolean has three states, 0 (FALSE) 1 (true), and null, as shown in the following illustration,
After the following INSERT statement, the test can be inserted successfully. And, by
SELECT * from stu where flag = "Database"
Query to t
] values('a4', 0);insert into [stu] values('a5', 1);insert into [stu] values('a6', null);insert into [stu] values('a7', 1);insert into [stu] values('a8', 1);insert into [stu] values('string', 0);insert into [stu] values('string2', 0);insert into stu (name,flag) values ('a9',0); --0
In this case, we assume that sqlite uses the boolean type data inserted by the stable typ
approximately 2 billion bytes---------------------------------------------------(1) Binary data typeBinary data includes binary, Varbinary, and ImageBinary data types can be either fixed-length (binary) or variable-length.binary[(N)] is a fixed n-bit binary data. where n is the range of values from 1 to 8000. The size of its storage scenting is n + 4 bytes.varbinary[(N)] is a binary data of n-bit variable length. where n is the range of values from 1 to 8000. The size of its storage scenting is
SQL Server database field type descriptionThere are currently x field types in SQL Server database, broadly divided into 9 categories, namely string type, binary character string data type
Introduced:Operators of Boolean types: logical operators and comparison operatorsLogical operator: And,or,notNote that: false and null result is FalseComparison operator: isis Trueis Falseis not trueis not falseis unknownis not unknownIs nullis NOT NULLLog in to test database Create test test table Insert data to demonstrate:1. Login Library TESTDB1:[Email protected] ~]$ psql-utestwjw-h 127.0.0.1-d testdb1-p 36985Password for user testwjw: Enter passw
Label:
SQL Server data types
System.Data.SqlDbType
. NET data type
Int
SqlDbType.Int
Int
varchar
SqlDbType.VarChar
String
Bit
Sqldbtype.bit
bool
Datetime
Sqldbtype.datetime
Datetime
Decimal
Sqldbtype.decimal
Decima
1. SQL SERVER Data Type
The data class is a type of data attribute, indicating the type of information represented by the data. Any computer language defines its own data type. Of course, different programming languages have diff
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.