How SQL practices string concatenation 10

Updated on technology 2024-02-08
5 answers
  1. Anonymous users2024-02-05

    Add a field in Table 1 as a foreign key and Billno in Table 2

    This is achieved through query statements.

  2. Anonymous users2024-02-04

    1. Custom functions.

    2. Use the SQL of the Connect By substatement to connect the SQL with the sys connect by path function.

    3. Custom aggregate functions.

    How to use SQL Server log clearing.

    1. Set the database mode to simple mode: open SQL Enterprise Manager, click Microsoft SQL Server in the root directory of the console -- > SQL Server group -- > double-click to open your server -- > double-click to open the database directory -- > select your database name (such as forum database forum) -- then right-click to select properties -- > select options -- > select "Simple" in the mode of failure restore, and then press OK to save.

    2. Right-click on the current database to see the shrink database in all tasks, generally the default settings in it do not need to be adjusted, just click to confirm.

    3. After the database is shrunk, it is recommended to set your database properties to standard mode again, and the operation method is the same as the first point, because logs are often an important basis for recovering the database in some abnormal cases.

  3. Anonymous users2024-02-03

    You can use the stuff function in conjunction with xml path(), e.g. select stuff(

    select ','+convert(varchar, from as sv where sv.[type]='p' and <10 for xml path(''),1,1,'')

    The result is: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

  4. Anonymous users2024-02-02

    You mean a separate column of data, and then put together a row of data, right? For example, there are three rows in a column, which are "heaven", "earth" and "man". You want to get a line of data "heaven, earth and people" now, this is what it means.

    Then the method is for xml path, the specific way to write according to the actual situation, here can only say that using this method, how to write it should be written according to your field.

  5. Anonymous users2024-02-01

    Column splicing, stuff for xml path() method, you can look it up, this talks a lot, you can customize the middle spacer, the above example is one of them.

Related questions
5 answers2024-02-08

F get domain contrast is a formatting function (should be written by yourself), the first parameter (arg prod spec id) according to the second parameter (120) formatting and return the result to the v bill code, according to the function naming method, the above ** should be the standard format for getting the date.

6 answers2024-02-08

If you don't enter the tiger's den, you will get the tiger. Practice, the queen of science (Bacon) Practice is the only goal of testing the truth of the pre-emptive reasoning, the factual wait a minute.

4 answers2024-02-08

sele date,a.win, b, lose from table, (sele date count(result) as win from table where rsult='Win'group by date )a,,(sele date count(result) as pay from table where rsult='Pay'group by date )b where table. date=table. >>>More

4 answers2024-02-08

select * from log a,(select ,max(date) from logwhere id='10000' >>>More

18 answers2024-02-08

Enterprise Manager directly with SQL has this feature.