MySQL string intercept function: Left (), right (), substring (), Substring_index (). There is also mid (), substr (). where mid (), substr () is equivalent to the substring () letter
LOCATE (SUBSTR,STR)POSITION (substr in str)
Returns the position of the substring substr the first occurrence in string str. If substring substr does not exist in STR, the return value is 0:
The code is as follows
Copy Code
mysql> SELECT
Command Lookup-which
The which command is used to find executable files contained in path (that is, commands)
which [-A] command
-A: List all commands
File and directory Lookup-Whereis, locate, find
Where Whereis and locate are found from the database, so they are faster, but unable to find the most recent data, because the database is updated daily by default (or you can perform a manual update of the
Recently started to contact Linux, in the virtual machine loaded Ubuntu, the current version is Ubuntu 11.10, installed after the natural installation of some software, after setting the source of the software, began the sudo apt-get install, the results appear the following unable to Locate Package Error:
[Email protected]:~$ sudo apt-get install mysql-server mysql-client
[sudo] password for letuknowit:
Reading Package Lists ... Done
For various DB2 versions, use the floor function or cast function to take the integer part, and then subtract the integer part from the original number:
For various DB2 versions, use the floor function or cast function to take the integer part, and then subtract the integer part from the original number:
I. Simplest and quickest method
For various DB2 versio
:
-- Returns the current system time.
Oracle: select sysdate from dual;
DB2: select current date from sysibm. sysdummy1
-- Returns the next day of the current time (same as the year and month)
Oracle: select sysdate, sysdate + interval '1' day from dual;
DB2: select current date + 1 day from sysibm. sysdummy1
3. String functions:
Length, lcase, ucase, ltrim, rtrim
Coalesce (arg1, arg2 ....) : The first non-
1, in the DB2 database host encountered a major failure, we can collect database diagnostic log data through Db2support
#在可以连接的时候
#db2support. -D sample-c-g-s
#不能连接的时候
#db2support. -c-g-S
2, Bufferpool set too large to connect the database caused system downtime solution:
Operation Steps:
#db2set db2_override_bpf=10000
#db2 Terminate
#db2stop
#db2start
#db2
This time, our DB2 is deployed on Windows. Windows has a client that is called a graphical interface. But it does not seem to work well, we have some problems, let's solve it.
First, add a database instance:
Instances of DB2 are independent of each other, and instances can be considered as containers for databases. When the default DB2 is installed, it builds an
Transferred from:
Http://www.kuqin.com/linux/20091009/70532.html
1. Find
Find is the most common and powerful search command. You can use it to find any file you want.
The format of find is as follows:
$ Find
-
-
-
If no parameters are added, find searches for the current directory and Its subdirectories by default, does not filter any results (that is, returns all files), and displays them all on the screen.
Find instance:
$ Find.-Name "My *"
Search for all files whose names start with "
The indexOf-like method LOCATE () and indexoflocate in mysql
LOCATE (substr, str), LOCATE (substr, str, pos)
The first syntax returns the position of substr In the first occurrence of the string str.
The second syntax returns the position of the substring substr in the string str, the first occurrence from the pos. If substr is not in str, the return value i
The Linux locate command is used to find a document that meets the criteria. It stores the document and directory name in the database to find the document or directory that meets the template style criteria.Generally, you only need to enter locate your_file_name to find the specified file.SyntaxLocate [-d] [-- help] [-- version] [template style...]Parameters: -D or -- database = the database used to con
replace Yo, that is whereis and locate!3 , LocateThe locate command is actually another way of writing "Find-name", but much faster than the latter because it does not search for a specific directory, but instead searches for a database (/var/lib/locatedb), which contains all the local file information. The Linux system automatically creates this database and updates it automatically once a day, so you can
route, so the basic function is to find the executable file2, WhereisGrammar:[[email protected] ~]# Whereis [-bmsu] file or directory nameParameter description:-B: Only binary files are found-M: Only files found under the manual path of the description file-S: Find source files only-u: File without document descriptionFor example:[Email protected] ~]# Whereis passwdpasswd:/usr/bin/passwd/etc/passwd/usr/share/man/man1/passwd.1.gz/usr/share/man/man5/passwd.5.gzFind the files associated with the p
added, find searches the current directory and its subdirectories by default, and does not filter any results (that is, all files are returned) and displays them all on the screen.Examples of use of find:$ find. -name ' my* ' – lsSearches the current directory (with subdirectories, below) for all files with the file names that begin with my, and displays their details.$ Find/home-user RTOsSearch for files owned by the owner as RTOs$ find. -type f-mmin-10Searches the current directory for all th
/passwd.1.gz/usr/share/man/man5/passwd.5.gzFind the files associated with the passwd file[Email protected] ~]# whereis-b passwdpasswd:/usr/bin/passwd/etc/passwdOnly binary files are foundWhereis looks very fast compared to find, because the Linux system records all the files in the system in a single database file, and when you use Whereis and the locate described below, the data is looked up from the database, not like the Find command, By traversing
] ~]# Whereis passwdpasswd:/usr/bin/passwd/etc/passwd/usr/share/man/man1/passwd.1.gz/usr/share/man/man5/passwd.5.gzFind the files associated with the passwd file[Email protected] ~]# whereis-b passwdpasswd:/usr/bin/passwd/etc/passwdOnly binary files are foundWhereis looks very fast compared to find, because the Linux system records all the files in the system in a single database file, and when you use Whereis and the locate described below, the data
/passwd.1.gz/usr/share/man/man5/passwd.5.gzFind the files associated with the passwd file[Email protected] ~]# whereis-b passwdpasswd:/usr/bin/passwd/etc/passwdOnly binary files are foundWhereis looks very fast compared to find, because the Linux system records all the files in the system in a single database file, and when you use Whereis and the locate described below, the data is looked up from the database, not like the Find command, By traversing
, search for normal files + special files + directories.2. LocateThe locate command is actually another way of writing "Find-name", but much faster than the latter because it does not search for a specific directory, but instead searches for a database (/var/lib/locatedb), which contains all the local file information. The Linux system automatically creates this database and updates it automatically once a day, so you can't find the latest changed fil
INSTR (STR,SUBSTR)Returns the first occurrence of a string of str neutron strings. This is the same as locate (), unless the order of the parameters is reversed.
The code is as follows
Copy Code
mysql> SELECT INSTR (' Foobarbar ', ' Bar ');-> 4mysql> SELECT INSTR (' Xbar ', ' foobar ');-> 0
LOCATE (SUBSTR,STR), LOCATE (Subst
Nanning SEO small knitting to believe that we all will feel for a new station, we choose the core keywords and target keywords, usually is difficult to choose, how we should select the core of our site keywords and target keywords. Let's look at this topic together.
First, the new station positioning core keywords and target key words importance
For the new station, positioning the new station's core keywords and target keyword is a lot of people are difficult to choose things, Nanning seo b
Tags: no latest BFS group pts syslog ISO inotify proc1.locateThe locate command is a file search command that searches faster than the find command because it does not search for a specific directory.Instead, it searches for a database that contains all the local file information. The Linux system automatically creates this database,and automatically updated every day, so use locate this command to find the
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.