Java-Mysql-SQLServer data type matching quick query table, mysqlsqlserver

Source: Internet
Author: User

Java-Mysql-SQLServer data type matching quick query table, mysqlsqlserver

Java-Mysql-SQLServer data type matching quick query table Mysql ***************************** * ***** the current column ClassName ColumnType DisplaySize TypeName0: java. lang. integer ColumnType: 4 11 INTEGER1: java. lang. integer ColumnType:-6 4 TINYINT2: java. lang. string ColumnType: 12 0 UNKNOWN3: java. lang. boolean ColumnType:-7 1 TINYINT4: java. lang. integer ColumnType: 5 6 SMALLINT5: java. lang. integer ColumnType: 4 9 MEDIUMINT6: java. lang. integer ColumnType: 4 11 INTEGER7: java. lang. long ColumnType:-5 20 BIGINT8: java. lang. double ColumnType: 8 22 DOUBLE9: java. lang. double ColumnType: 8 22 DOUBLE10: java. lang. float ColumnType: 7 12 FLOAT11: java. lang. string ColumnType: 12 11 UNKNOWN12: java. lang. string ColumnType: 12 11 UNKNOWN13: java. lang. string ColumnType: 1 300 CHAR14: java. lang. string ColumnType: 12 300 VARCHAR15: java. SQL. date ColumnType: 91 10 DATE16: java. SQL. time ColumnType: 92 8 TIME17: java. SQL. date ColumnType: 91 4 YEAR18: java. SQL. timestamp ColumnType: 93 19 TIMESTAMP19: java. SQL. timestamp ColumnType: 93 19 DATETIME20: [B ColumnType:-3 255 TINYBLOB21: [B ColumnType:-4 65535 BLOB22: [B ColumnType:-4 16777215 MEDIUMBLOB23: [B ColumnType: -4-1 BLOB24: java. lang. string ColumnType: 12 255 TINYBLOB25: java. lang. string ColumnType:-1 65535 TEXT26: java. lang. string ColumnType:-1 16777215 MEDIUMBLOB27: java. lang. string ColumnType:-1-1 TEXT28: java. lang. string ColumnType: 1 3 CHAR29: java. lang. string ColumnType: 1 3 CHARSQLServer *********************************** 0: java. lang. integer ColumnType: 4 11 int identity1: java. lang. long ColumnType:-5 20 bigint2: byte [] ColumnType:-2 100 binary3: java. lang. boolean ColumnType:-7 1 bit4: java. lang. string ColumnType: 1 10 char5: java. SQL. timestamp ColumnType: 93 23 datetime6: java. SQL. timestamp ColumnType: 93 23 datetime7: java. math. bigDecimal ColumnType: 3 20 decimal8: java. lang. double ColumnType: 6 22 float9: byte [] ColumnType:-4 2147483647 image10: java. math. bigDecimal ColumnType: 3 21 money11: java. lang. string ColumnType: 1 10 nchar12: java. lang. string ColumnType:-1 1073741823 ntext13: java. math. bigDecimal ColumnType: 2 20 numeric14: java. lang. string ColumnType: 12 50 nvarchar15: java. lang. float ColumnType: 7 13 real16: java. SQL. timestamp ColumnType: 93 16 smalldatetime17: java. lang. integer ColumnType: 5 6 smallint18: java. math. bigDecimal ColumnType: 3 12 smallmoney19: java. lang. string ColumnType: 12 8000 SQL _variant20: java. lang. string ColumnType:-1 2147483647 text21: byte [] ColumnType:-2 16 timestamp22: java. lang. integer ColumnType:-6 3 tinyint23: java. lang. string ColumnType: 1 36 uniqueidentifier24: byte [] ColumnType:-3 100 varbinary25: java. lang. string ColumnType: 12 50 varchar

  


"Data Type mismatch in standard expressions" why? I checked that all types match

String selcom1 = "SELECT * FROM GuestBook WHERE PostID =" + postID;
String selcom2 = "SELECT * FROM GuestBook WHERE ParentID =" + postID;

PostID and ParentID are integer types, so no single quotation marks are required. However, in most database systems, there is no error in single quotes. But I suggest you try it out here. This may be the reason.

In addition, I suggest that you do not use this method here, so it is safer to use parameters.

SQL statement. The data type in the standard expression does not match

Remove the single quotation marks '{0}' and '{1}'. Otherwise, you should use the text type.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.