||’, ‘)ORDERBYx).EXTRACT(‘//text()’))ASconcatvalFROMqGROUPBYKEYAggregating multiple lines: SQL code
With temp as (
Select ' China ' nation,' Guangzhou ' to dual Union All
Select ' China ' nation,' Shanghai ' to dual Union All /c9>
Select ' China ' Nation,' Beijing ' to dual Union All
Select ' USA ' Nation,' New York ' to dual Union All
Select ' USA ' Nation,' Bostom '
data in the array: by the $ character. If you want to match two attributes when querying in an array, you will need to use the $elemmatch method, assuming that only {"name": "Google", "Address": USA} to find, Will select all the elements named Google or address for the USA. After locating this element, select it by $ to change it.Person.update ({"Name": "Jobs",company:{$elemMatch: {"name": "Google", "Addre
(Time,format) MySQL date, time conversion function: Date_format (Date,format), Time_format (Time,format) is able to convert a date/time into a variety of string formats. It is an inverse conversion of the str_to_date (Str,format) function. 5. MySQL gets the national region time Format function: Get_format () MySQL Get_format () syntax: Get_format (Date|time|datetime, ' EUR ' | ' USA ' | ' JIS ' | ' ISO ' | ' Internal All examples of MySQL Get_format
content to be imported is in the control file10,20,3020,30,40//********************************************************************************//Control File Example:Note that the value after the begindata cannot have spaces before 1 * * * Normal loadLOAD DATAINFILE *REPLACE into TABLE DEPTFields TERMINATED by ', ' optionally enclosed by ' "'(DEPTNO,Dname,LOC)Begindata10,sales, "" "USA" ""20,accounting, "Virginia,
:30
As you can see, the Str_to_date (Str,format) conversion function allows you to convert some disorganized strings into a date format. In addition, it can also be converted to time. "Format" can be see the MySQL manual.
4. MySQL Date/time to STR (date/time converted to string) function: Date_format (Date,format), Time_format (Time,format)
MySQL date, time conversion function: Date_format (Date,format), Time_format (Time,format) is
able to convert a date/time into a variety of string fo
react dynamically to the instance. Just as your mother is trendy, the neighbors say you're the son of a hot woman. * Notice, here we rewrite the person's prototype, is to add a lastName attribute to mother, equivalent to mother.lastname= ' Jin ' * Here is not to change mother.prototype, change the different levels, the effect will often have a great difference. * P1: ' Jack ', [' Hangzhou ', ' Guangzhou ']; __proto__: ' Jin '; __proto__:18,[' Shenzhen ', ' Shanghai '] *
easy to pass some complex data through a string, and then it is much more convenient to work with Ajax.Let's look at the role of PHP's Serialize function.With the simple example above, it is easy to pass some complex data through a string, and then it is much more convenient to work with Ajax.Let's look at the role of PHP's Serialize function.example Four:=Array(‘Peter‘=Array(‘Country‘=‘USA‘,‘Age‘=20),‘Li Ming‘=Array(‘Country‘=‘China‘, ' age "=>21
data can be transmitted through a string, which is indeed much more convenient to work with Ajax.Next let's take a look at the role of the PHP serialize function.
JSON parsing Example 4:
$arr = array
(
'Peter'=> array
(
'Country'=>'USA',
'Age'=>20
),
'Li Ming'=> array
(
'Country'=>'CHINA',
'Age'=>21
Turkey
The program has been caught
94.122.2.16157 -- 09:53:39 --/
1917
Turkey, USA
The program has been caught
94.54.37.54 -- 02:44:07 --/
1096
Turkey, USA
The program has been caught
95.14.1.97 -- 08:30:10 --/
167
Turkey, USA
95.15.248.177 -- 11:14:54 --/
1454
Turkey,
what to do. The above example indicates loading data.(2): * indicates to load all the data (Example 1). You can also specify the name of the data file (Example 2 ).(3): This will tell the table to which sqlldr is to be loaded. Complete Syntax: [insert | append | replace | truncate] into table dept insert-the default value is insert. The following dept table must be empty; append-append, the following dept table can not be blank; replace-is the first to delete and then insert; truncate-is the fi
.# Chkconfig sybase onIn this way, the connection file S85sybase in/etc/rc.3 and/etc/rc.5 will be started automatically when the system is started.
To enable automatic sybase Shutdown# Ln-sf/etc/init. d/sybase/etc/rc0.d/K25sybaseProcedure# Service sybase status# Service sybase start# Service sybase stop
Or execute Common Startup commands.# Unset LANG# Startserver-f/opt/sybase/ASE-15_0/install/RUN_PDCSS-f/opt/sybase/ASE-15_0/install/RUN_PDCSS_BSDisable the server# Isql-
') |+ ---------------------------------------------------- +| 1, 20080808222301 |+ ------------------------------------------------ + Mysql> select time_format ('22: 23: 01', '% H. % I. % s ');+ ------------------------------------- +| Time_format ('22: 23: 01', '% H. % I. % s') |+ ------------------------------------- +| 22.23.01 |+ ------------------------------------- +MySQL date and time conversion functions: date_format (date, format), time_format (time, format) can convert a date/time to a
/2008', '%m/%d/%Y'); -- 2008-08-09
select str_to_date('08/09/08' , '%m/%d/%y'); -- 2008-08-09
select str_to_date('08.09.2008', '%m.%d.%Y'); -- 2008-08-09
select str_to_date('08:09:30', '%h:%i:%s'); -- 08:09:30
select str_to_date('08.09.2008 08:09:30', '%m.%d.%Y %h:%i:%s'); -- 2008-08-09 08:09:30
We can see that the str_to_date (str, format) Conversion Function can convert disordered strings into date formats. In addition, it can be converted to time. For "format", see the MySQL manual.
4. MySQL
Turkey
The program has been caught
94.122.2.16157 -- 09:53:39 --/
1917
Turkey, USA
The program has been caught
94.54.37.54 -- 02:44:07 --/
1096
Turkey, USA
The program has been caught
95.14.1.97 -- 08:30:10 --/
167
Turkey, USA
95.15.248.177 -- 11:14:54 --/
1454
Turkey,
MySQL multi-table operations and batch processing methods (3) 3. add Records
We have already discussed how to add a record to repeat this record for ease of viewing:
Mysql> insert into mytable-> Values ('ABC', 'F', '1966-08-17', 'China', 'n ′);Query OK, 1 row affected (0.05 sec)
Check it out:
Mysql> select * from mytable;+ ---------- + ------ + ------------ + ----------- + -------- +| Name | sex | birth | birthaddr | single |+ ---------- + ------ + ------------ + ----------- + -------- +|
:
Li Ming: Benz
Through the simple example above, some complex data can be transmitted through a string, which is indeed much more convenient to work with Ajax.
Next let's take a look at the role of the PHP serialize function.Procedure 4:
$arr = array ( 'Peter'=> array ( 'Country'=>'USA', 'Age'=>20 ), 'Li Ming'=> array ( 'Country'=>'CHINA', 'Age'=>21
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.