Tag:query

  • Summary of common methods for SQL server to query the first n records

    Time:2020-11-4

    This paper describes the common methods of SQL server to query the first n records. Share with you for your reference. The details are as follows: SQL Server Query of the first n records is often used by us. The following is a detailed introduction to the method of SQL Server querying the first n […]

  • An example of IP address query through Web Service

    Time:2020-10-13

    Example 01 implements a simple web service access This instance will implement the IP address query interface service, and return the IP address to the province, city and region where the IP address is located according to the IP address passed in by the user. The instance will use the IP address database for information […]

  • Tp5.1 framework database common operation details [add, delete, update, query]

    Time:2020-9-25

    This paper describes the common operations of tp5.1 framework database. For your reference, the details are as follows: Tp5.1 — database add operation useDb ClassinsertMethods submit data to the database $data = [‘foo’ => ‘bar’, ‘bar’ => ‘foo’]; Db::name(‘user’)->insert($data); insertMethod returns the number of successfully added data. Normally, it returns 1 Or usedataMethod coordinationinsertuse. $data […]

  • Oracle basic query usage example

    Time:2020-8-15

    This paper describes the basic query usage of Oracle. For your reference, the details are as follows: 1、 Basic select statement SELECT *|{[DISTINCT] column|expression [alias], …} FROM table; For example: –Query all data select * from emp; –Query specified column data select empno,ename,sal from emp; –Arithmetic operator (+ – * /) select ename,sal,sal+30 from emp; […]

  • JSP simple add, query function code

    Time:2020-5-10

    The example of this paper describes the simple add and query function of JSP. Share with you for your reference. The details are as follows: JSP technology: public class ISOtoGb2312 { public static String convert( String str ) { try { byte<> bytesStr=str.getBytes( “ISO-8859-1” ) ; return new String( bytesStr, “gb2312” ) ; } catch( […]

  • VBS that can query system user name sid

    Time:2020-5-10

    Copy codeThe code is as follows: set path=wscript.createobject(“wscript.shell”) usera=path.ExpandEnvironmentStrings(“%username%”) Name = InputBox (“please enter the user name you want to query“, “Sid query — by don’t regret”, usera)strComputer = “.” Set wbemServices = Getobject(“winmgmts:\\” & strComputer) Set wbemObjectSet=wbemServices.execquery(“select sid from win32_userAccount where name=’”&name&”‘”) For Each mo In wbemObjectSet sSID = mo.sid Next If(sSID = “”)Then […]

  • Summary of mongodb query skills

    Time:2020-5-8

    In mongodb, the DB. Collection. Find() method is used to retrieve documents from the collection. The DB. Collection. Find() method returns a cursor that retrieves the document. The DB. Collection. Findone() method also performs a read operation, returning a document. On the internal implementation, the DB. Collection. Findone() method uses limit 1 for DB. Collection. […]

  • A collection of SQL server query statements

    Time:2020-3-22

    1、 Simple queryA simple transact SQL query includes only the select list, from clause, and where clause. They respectively describe the columns to be queried and theTables or views, search criteria, and so on. For example, the following statement queries the nickname field and email field with the name “Zhang San” in the testable table. […]

  • SQL query ranking function instance

    Time:2020-3-18

    In actual development, it is often encountered to calculate the ranking of a field The following table: totak’u sales Now we need to add a sales [rank] field to display the ranking order Method: Copy codeThe code is as follows: SELECT a1.Name, a1.Sales, COUNT(a2.sales) Sales_Rank FROM Total_Sales a1, Total_Sales a2 WHERE a1.Sales <= a2.Sales or […]

  • MSSQL simple query out all the duplicate data in the data table

    Time:2020-2-11

    The example of this article describes the method of MSSQL to simply query all the duplicate data in the data table. To share with you for your reference, as follows: Here is an example: SELECT * FROM SYS_LogContent slc WHERE slc.LogInfo_ID IN ( SELECT slc2.LogInfo_ID FROM SYS_LogContent slc2 GROUP BY slc2.LogInfo_ID HAVING COUNT(*)>1 ) Brief […]

  • How to view website IP address how to query website IP address

    Time:2020-1-24

    Click Start Menu – run, or press start + R to open a system window. Enter CMD in window China and enter the system “command prompt” window, as shown in the figure For example, we can query the IP address of a website here, enter Ping 917vr.com in the command prompt window, and then enter. […]

  • Analysis of common query and display methods of JSP page

    Time:2020-1-15

    The example of this paper describes the common query and display methods of JSP page. To share with you for your reference, as follows: Background: 1. The database query results need to be displayed in a list in JSP2. In a good J2EE mode, database query is generally implemented by Dao (data access object), and […]