Description
Cut press the column to split the file and you can specify the delimiters for each column. In cut terms, each column is a field, sometimes the first column, which may be described as the first field.
Actual combat:
Suppose there is a file data.txt, the format is as follows
NO Name Mark Percent1 Sarath 45 902 Alex 49 983 Anu 45 90
Delimiter (delimiter) as tab tab
If I want to get the second column, everyone's name, is there any good w
ID from [user] a where exists (select * from [user] WHERE name = A.name GROUP BY name has count (*) > 1)) as B
On t.id = b.ID
6. Some highly difficult SQL
Http://www.teecool.com/post/2007072807.html
² If the structure and data of the table :
Table 1:usertableUSERID USERNAME1 user12 NULL3 User34 NULL5 User56 User6
Table 2:usergrade;USERID USERNAME GRADE1 User1 902 NULL 807 User7 808 User8 90
then execute the statement select COUNT (*) from Usergrade w
that ultimately promotes the site's ability to sell or advertise.
Compared to the concept of both, we seem to have seen, microblogging and SEO the ultimate goal is to promote and promote. For our seoer, included, outside the chain, ranking the three words almost became a topic of discussion, the following Boshi stone from these points to analyze Micro bo this SEO tool.
We in the Baidu search box input "corporal punishment 4 children 3 into Peking University", draw the following figure informa
ID, student, course, mark1, Zhang San, Chinese, 902, John Doe, Chinese, 803, Zhang San, mathematics, 704, John Doe, mathematics, 80Now you want to use the Transpose table method to go to the two-dimensional table output, the required format is:Student, Chinese, mathsZhang San, 90, 70John Doe, 80, 80
selectstudent,sum(if(course=‘语文‘,mark,0))as语文,sum(if(course=‘数学‘,mark,0))as数学fromtable1groupbystudent
1 A2 b1
Tags: automated mod line generate CSV file execution log root readRecently the company has a tens of millions of-row large table that needs to be split into different CSV files according to the city's ID field. Wrote an automated shell script Underneath the/HOME/HDH. LINUX-XUD0:/HOME/HDH # LLTotal 16-rwxrwxrwx 1 root root 902 Dec 07:47 cf.sh-RWXRWXRWX 1 root root 6 Dec 07:47 id_1.txt-RWXRWXRWX 1 root root 6 Dec 20:00 log Vim cf.sh #!/bin/bashdate=$ (d
emp where job= ' job ';2.editDescription: The command can edit the specified SQL scriptCase: Sql>edit D:\a.sql3.spoolNote: This command can output the contents of the Sql*plus screen to the specified file.Spool D:\b.sql and enter spool offDisplaying and setting environment variablesOverview: Can be used to control the output of various formats, set show if you want to permanently save the relevant settings, you can go to modify the Glogin.sql script1.linesizeDescription: Sets the width of the d
put the db2ese_c.lic in a directory: /opt/ibm/db2/v9.7/license/db2ese_c.lic, executed under the/opt/ibm/db2/v9.7/adm/directory: Db2licm-a/opt/ibm/db2/v9. 7/license/db2ese_c.lic Display after execution: lic1402i License added successfully. And then db2licm-l, you'll find that your DB2 has become permanent, you're done, and you won't be afraid DB2 database is out of date 5. Create the user groups and users required to run the DB2 901 db2iadm1
902 db2f
The db2licm-l command can view license information to DB2. You can find a permanent license add to the DB2 database and put the db2ese_c.lic in a directory:
/opt/ibm/db2/v9.7/license/db2ese_c.lic, executed under the/opt/ibm/db2/v9.7/adm/directory:./db2licm-a/opt/ibm/db2/v9.7/license/ Db2ese_c.lic
Create an instance user
Groupadd-g 901 db2iadm1 groupadd-g 902 db2fadm1 groupadd-g 903 dasadm1 useradd-g
Tags: phone plus a list of Xen features unique writing Nali Ace storeFirst questionA class of students and exam results information is shown in the following table student:Student tableID SName Mark1 Jack 902 Marry 963 Rose 884 Bob 865 John 836 Belty 857 RobertWhere ID is the student's number, sname is the name, mark is the result, please write the appropriate SQL for the following questions:CREATE TABLE student (ID tinyint unsigned primary key Auto_i
the Sql*plus5.clear screenClear Screen 2), File Operation command1.start and @Description: Run SQL scriptCase: sql>@ d:\a.sql or Sql>start d:\a.sql2.editDescription: The command can edit the specified SQL scriptCase: Sql>edit D:\a.sql, this will open the D:\a.sql file.3.spoolNote: This command can output the contents of the Sql*plus screen to the specified file.Case: Sql>spool d:\b.sql and input sql>spool offegSql>spool D:\b.sql;Sql>select * from EMP;Sql>spool off; 3), interactive commands1.N
password:Password has changedSql>4.show UserDescription: Displays the current user name5.exitDescription: The command disconnects from the database and exits the Sql*plus5.clear screenClear Screen2), File Operation command1.start and @Description: Run SQL scriptCase: sql>@ d:\a.sql or Sql>start d:\a.sql2.editDescription: The command can edit the specified SQL scriptCase: Sql>edit D:\a.sql, this will open the D:\a.sql file.3.spoolNote: This command can output the contents of the Sql*plus screen
In SQL Server, smaller data can be stored using varchar (n), nvarchar (n), and varbinary (n) types, storing large data, using varchar (max), nvarchar (max), and varbinary (max ) Instead of the text, ntext, and image data types.whichvarchar (max) instead of text;nvarchar (max) instead of ntext;varbinary (max) instead of imageThe difference between ntext and nvarchar (MAX)NTEXTBy default, ntext stores text data in the LOB structure, only pointers are stored in the table structure, and the pointer
=" border-left-0px; border-right-width:0px; Background-image:none; border-bottom-width:0px; padding-top:0px; padding-left:0px; padding-right:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M00/6C/48/ Wkiom1vdlnbb6xcuaalp4uaffbg502.jpg "width=" 902 "height=" 407 ">Attention:1. Backing up existing mailboxes2. After all mail recovery is successful, only in the Inbox, the next time recovery, no longer recover, avoid du
script1 linesize: Sets the width of the display line, which is 80 characters by default:Sql>show linesizeSql>set Linesize 902 "pagesize: Set the number of lines displayed per page, default is 14, use the same as Linsize(4) granting and recycling of permissionsHope xxxxx users can go to query the EMP tableHopefully xxxxx users can query Scott's EMP table: Grant SELECT on EMP to XXXXXXHopefully xxxxx users can modify Scott's EMP table: Grant update on
901. CHAINED_ROWSStores the output of the ANALYZE command with the list chained rows clause.
902. CHAINGE_SOURCESAllows the publisher to view existing changed resources.
903. CHANGE_SETSAllows the publisher to view existing change settings.
904. CHANGE_TABLESAllows publishers to view existing change tables.
905. CODE_PIECESORACLE accesses this view to create a view on the object size.
906. CODE_SIZEORACLE accesses this view to create a view on the obj
from v $ sga_dynamic_free_memory;
The result is 208 M.
SGA_TARGET = 1200-208 = 902 M.
Cancel pai_pool_size DB_CACHE_SIZE LARGE_POOL_SIZE from the parameter file
In the automatic memory management mode, if spfile is applied to the database, after the database is closed, the system records the status of the Last Database shutdown, the value of each component of the adjusted memory parameter will be saved in the parameter file. Therefore, if you use a
Test environment:One router (R2) has three interfaces, one connected to the internal network, two connected to ISP1 (R1) and ISP2 (R3), and the two ISP outlets are connected to the same switch, then, a router (route) is connected outside the vswitch. Two ISPs (R1, R3, and router) use the ospf dynamic route, and then the policy route is made on R2, route is determined based on the next hop address. --- R3 ---Route --- ---- R2 ---- internal network--- R1 --- R3 # sh ru
How JavaScript obtains the file's suffix format:When uploading files, most need to verify the file format, then first get the file format suffix name, that is, the file format type, the following examples of how JavaScript implementation of this feature. The code is as follows://by Morewindows (http://www.51texiao.cn/)functionGetextensionfilename (pathfilename) {varReg =/(\\+)/G; varPFN = Pathfilename.replace (Reg, "#"); varARRPFN = Pfn.split ("#"); varfn = Arrpfn[arrpfn.length-1]; varARRFN = Fn
In Oracle, you can use the decode function to convert rows to columns. For example, if you have A student table named A: IDNAMESUBJECTSCORE1 Zhang San Language 902 Zhang San mathematics 803 Li Si.
In Oracle, you can use the decode function to convert rows to columns. For example, if you have A student table named A: id name subject score, 1 picture, 3 Chinese, 90 picture, 2 picture, 3 math, 80 picture, and 4 picture.
You can use the decode functio
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.