. Insert a data into the ' T8 ' Values (now (), now ()); 2. Change the client time zone (East Zone 9, Japan time zone). 3. Display the inserted data again, changed, timestamp type of data increased by 1 hours mysql> desc T2; +-------+-----------+------+-----+-------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------+------+-----+-------------------+-----------------------------+ | Date1 | da
=s.title_id andS.qty> the)View CodeThe result of this query is finally empty. Why is it? The last inserted null is the data that satisfies where qty>75 why is it not returned?The answer is that even though the connection condition is Titleid=titleid, and the inserted data titleid=null,null how could it be equal to null? Null is not equal to, nor equal to himselfexists and inThere are some peculiarities in replacing the exists with in.1 Select Count(title) fromtitles T2 wheret.title_idinch(Select
Connect MySQL database command: mysql-u root-pCreating MySQL Database: Create databaase XX library;To create a MySQL table:CREATE TABLE Db_xx Tables (ID int primary KEY auto_increment,Name varchar (+) is not NULL,Address varchar (+) is not NULL,Salary Decimal (9,2),Createtime----Building a table operationCREATE TABLE Db_job (ID int primary KEY auto_increment,Createtime datetime DEFAULT Current_timestamp,UpdateTime datetime default NULL,Startime timestamp not NULL default current_timestamp, En
name;Select Database ();Drop DATABSE library name;Naming rules for library names?Common SQL commands for managing tables?Show tables;DESC table name;SELECT * from table name;CREATE TABLE Table name (Field Name Type (width), field name type (width), field name typeWidth);Insert into table name values (List of field values), (field value list);;drop table name;MySQL data type?Numerical: Weight, height, score, salaryIntegral type tinyint smallint mediumint int bigintCREATE table T1 (level tinyint)
for future reference (equivalent to comments in the program).
* = = =====
The description here is more confusing than the command line that directly refers to a command helps more coherently: @+ n$ g6 M |; K-u
-------------------------
ECHO
Displays or hides the body of the batch program when the program is running. can also be used to allow or suppress the echoing of commands.
/N9 B "q-l# ~, I
When you run a batch program, MS-DOS typically displays (echoes) commands in the batch program on
does not support transactional processing, does not occupy disk space, so the access speed'm going aunt we execute the query is relatively high frequency, the use of MyISAM such a storage engine2> innodb//can support transactions, take up disk space, reduce access speed because it is secure, so we recommend using the InnoDB storage engine when performing some risky operations, modifying, deleting 2. View the current storage engine we are usingShow variables like ' default_storage_engine ';+----
Label:Same Show The timestamp column is displayed in the same format as the datetime column. In other words, the display width is fixed at 19 characters, and the format is Yyyy-mm-dd HH:MM:SS. Different Range datetime Retrieves and displays datetime values in the ' yyyy-mm-dd HH:MM:SS ' format. The supported range is ' 1000-01-01 00:00:00 ' to ' 9999-12-31 23:59:59 'TIMESTAMP value cannot be earlier than 1970 or later than 2037 Stores TIMESTAMP 1.4 Bytes of storage (time stamp value is stored in
, however, can be problematic, as the old data will be recalculated when we add the partition to 5. Once you can determine which partition this row of data will exist in. This can cause performance problems. CREATE TABLE t7 (x int,y int) partition by hash (x) partitions 5;--hash (expr) expr is also possible if it is an expression that returns an integer. The fourth kind: The key partition, and the hash partition difference is not big. It has two great advantages. One it supports all data types e
SameShowThe timestamp column is displayed in the same format as the datetime column. In other words, the display width is fixed at 19 characters, and the format is Yyyy-mm-dd HH:MM:SS.DifferentRangedatetime Retrieves and displays datetime values in the ' yyyy-mm-dd HH:MM:SS ' format. The supported range is ' 1000-01-01 00:00:00 ' to ' 9999-12-31 23:59:59 'TIMESTAMP value cannot be earlier than 1970 or later than 2037StoresTIMESTAMP1.4 Bytes of storage (time stamp value is stored in 4 bytes)2. Va
%s.SsDisplays the seconds as a number with leading zeros (for example, 12:15:05).FDisplays the decimal part of the second. For example, the FF will be accurately displayed to 1% seconds, and the FFFF will be displayed exactly one out of 10,000 seconds. You can use up to seven F symbols in a user-defined format. If this is the only character in a user-defined number format, use%f.TUse a 12-hour system, and display uppercase A for any hour before noon, and display uppercase P for any hour between
phone_number row updated.
In session 1, the hr1 user realizes that itUpdated the GHIMURO row withWrong phone number. The user startsNew transaction and updates the phoneNumber in the row to 515.555.1235,Which locks the GHIMURO row.
T7
last_name GHIMURO .
In session 2, the hr2 user queriesHr. employees for the Himuro record.The record shows the phone numberUpdate committed by session 1 at t4.Oracle Database read consistencyEnsures that session 2 does not seeUncommit
Packagecom. String;publicclassa{publicstaticvoidmain (String[] args) {Stringstr= "Thisis atestofjava "; t1 (str);// The static method can call t2 (str) directly; NBSP;NBSP;T3 (str); t4 (str); NBSP;NBSP;NBSP;T5 (str); NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;T6 (str); t8 ("123321"); }//1. Counts the number of occurrences of the letter S in the string publicstaticvoidt1 (STRINGNBSP;STR) { intnum=0;// Define a counter for (INTNBSp;i=0;iComplete the task
1. The best format for namespace in 2. Consider whether you need to set namespace to a complex number, such as System.Collections in the FCL3. Avoid naming your own type with the type name of the FCL4. Class names are best used in nouns5. Interface names preferably with adjectives6. The name of the derived class is suffixed with the base class name7. Generic type parameters are prefixed with T8. Enumeration type name should be plural9. Properties, fie
in in in T16> ()Func Public Delegate TResult func out tresult> ()// int method (); funcintten; // int method (x); funcintint2; // int method (X,X); funcintint int > TEST6 = (x, y) + x * y; Public Delegate TResult funcin in in in in out Tresult> ()Tuple Public Static Tuple( T1 item1)var tuple1 = tuple.create (1); Console.WriteLine (Tuple1. ITEM1); // Displays 1 var New tupleint> (1); Console.WriteLine (Tuple1. ITEM1); // Displays 1Tuple.createmethods (T1, T2, T3, T4, T5, T6 ,
let's make a time zone impact on them.
1. insert a data insert into 't8 'values (now (), now ());
2. Change the client Time Zone (East 9, Japan time zone ).
3. The inserted data is displayed again, and changed. The timestamp type data is increased by 1 hour.
Next we will discuss other timestamp attributes.
1. Whether null is null
The default value of timestamp is "not null by DEFAULT". It is invalid if you define "ts TIMESTAMP default NULL. You can
In a nutshell, the two parameters are:
Path indicates the directory where the cookie resides
Domain represents the field where the cookie resides, and the default is the requested address
First modify our Hosts file my native intranet IP 192.168.1.162
One.
We create a folder in the Web root directory cookietest Create a file index.php
';? >Visit http://simael.php.com/cookietest/
Results:
No T3 T6 means that you cannot get a cookie for m0sh1.php.com under the domain name simael.php.com
Two
Comparison of mysql time types bitsCN.com
SameDisplay
The display format of the TIMESTAMP column is the same as that of the DATETIME column. In other words, the display width is fixed to 19 characters and the format is YYYY-MM-DD HH: MM: SS.
Different
Range
Datetime retrieves and displays DATETIME values in 'yyyy-MM-DD HH: MM: SS' format. Supported range: '2017-01-01 00:00:00 'to '2017-12-31 23:59:59' TIMESTAMP value cannot be earlier than 1000 or later than 9999
Storage
TIMESTAMP
Storage of 1.4
reading, and Phantom readingCorresponding to the above isolation, transaction concurrent access will occur: dirty read, non-repeatable read and Phantom read. Case transfer from Brother Yong blogDirty read: A transaction reads the uncommitted change data of the B transaction. The general database transaction does not allow the issue to occur by default.For example, here the query should be 1500, now there is dirty read.
Time
Transaction A (Deposit)
Transaction B (Withdr
time zone offset without leading zeros (for example,-8). If this is the only character in a user-defined number format, use%z.ZzDisplays the time zone offset with leading zeros (for example-08)zzzDisplays the full time zone offset (for example, -08:00)
Format displayM/d/yy12/7/58D-mmm7-decD-mmmm-yy7-december-58D MMMM7 DecemberMMMM yyDecember 58HH:MM TT08:50 PMH:mm:ss T8:50:35 Ph:mm20:50H:mm:ss20:50:35M/d/yyyy h:mm12/7/1958 20:50IOS NSDate Date
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.