Several issues were encountered:1. The column name returned from Oracle is in uppercase, then reflected, and cannot find a relative entitlement.The number type in 2.oracle returns, it becomes the BigDecimalpublic static void Main (string[] args)
This article is the superior operation of the related chapters of the experimental building .A) Create a database test, switch to the database, create a table in the database test, and insert the data,1) Create and switch2) Create a table and insert
General Query:select * from T;To remove duplicate values:Select distinct f1,f2 from T;Between usage:SELECT * FROM t where F1 not/between 1and 2;Like usage:SELECT * FROM t where F1 not/like ' _mdb% ';In usage:SELECT * FROM t where F1 not/in
1 , view the version of the database
SELECT @ @version
2 , view the machine operating system parameters of the database
EXEC master. xp_msver
3 , view database-initiated parameters
1.update dataUPDATESET= (selectfromwhere t.xh= b.vlbi_ XH)wherelike'14%';2. Judging men and women according to their ID numbers Decode (mod (To_number (substr ( ID number ', 17, 1) ", Span style= "color: #800000; Font-weight:bold; " >2), 0, 2 "" 1
Oracle Database Common Queries1, view the table space corresponding data file situation:Sql> SELECTTablespace_name,file_name, BYTES/1024x768/1024x768Mb,autoextensible fromDba_data_files; Tablespace_namefile_nameMB autoextensible----------------------
Tag: Bit order identifies important user access 0.00 NULL sign DealerCreate a sample table:CREATE TABLE shop(Article INT (4) UNSIGNED zerofill DEFAULT ' 0000 ',Dealer CHAR (DEFAULT ') ' Not NULL,Price DOUBLE (16,2) The DEFAULT ' 0.00 ' not
--1:case when--SELECTCaseWhen (admin_id are NULL) Then ' no creator 'When (admin_id = 0) Then ' admin 'ELSE admin_idEND as admin_idFrom Hsb_investor--2:if else is not available in the SELECT statement. A process that can only be used to control SQL
Our query operations, for different data tables Examstudent and customers, there will be different code writing process, using reflection and JDBC metadata can write a common method to query different data tables.We did this before:Query the fields
1, query numeric data:SELECT * from Tb_name WHERE sum > 100;Query predicate:>,=,,!=,!>,!,=2. Query stringSELECT * from tb_stu WHERE sname = ' cricode.com 'SELECT * from Tb_stu WHERE sname like ' Uncle%too 'SELECT * from Tb_stu WHERE sname like '%
Use of 1.unix timestampsUnix_timesamp, From_unixtime functions, and Datatime_format functions.Take the shaping unixtime timestamp from the datetime type;Select Unix_timestamp (datetime) from Examplestables;Convert from reshape to datetime type, time
A query for numeric data:SELECT * from Tb_name WHERE sum > 100;Query predicate:>,=,,!=,!>,!,=Two query stringsSELECT * from tb_stu WHERE sname = ' Xiao Liu 'SELECT * from Tb_stu WHERE sname like ' Liu 'SELECT * from Tb_stu WHERE sname like '%
A note book that lets you review your sentences quickly.CREATE TABLE Users (Username varchar (primary key),Userpwd varchar (20))ALTER TABLE users add age intInsert into Stu (sname) VALUES (' Sdfdsfdsfeeeeee ')Update CJ set cj=60 where sid=1Delete
Take the maximum value of the Time field: Db.getcollection (' Calllog '). Find (). Sort ({"Time": -1}). Limit (1) Minimum value only need to change –1 to 1 Db.getcollection (' Calllog '). Find (). Sort ({"Time": 1}). Limit (1) Appcode field is not
Common query methods in OracleQuerying all user information in OracleSELECT * from Dba_users;Querying users and Passwords onlySelect Username,password from Dba_users;Querying Current User InformationSELECT * from Dba_ustats;Querying view text that
The examples in this article describe the thinkphp Common query and expression query. Share to everyone for your reference. The specific analysis is as follows:
First, the general inquiry method
A, String mode:
Copy Code code as follows:
MONGO
SQL
Description
Db.users.find ()
SELECT * from Users
Querying all data from the user table
Db.users.find ({"username": "Joe", "Age": 27})
SELECT * from the users where "username" =
1, query numeric data:SELECT * from Tb_name WHERE sum > 100;Query predicate:>,=,,!=,!>,!,=2. Query stringSELECT * from tb_stu WHERE sname = ' Xiao Liu 'SELECT * from Tb_stu WHERE sname like ' Liu 'SELECT * from Tb_stu WHERE sname like '% Programmer '
First, query numeric data:SELECT * from Tb_name WHERE sum > 100;Query predicate:>,=,,!=,!>,!,=Second, query stringSELECT * from tb_stu WHERE sname = ' Xiao Liu 'SELECT * from Tb_stu WHERE sname like ' Liu 'SELECT * from Tb_stu WHERE sname like '%
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.