Database, XML, backend, etc.

1. Relevant knowledge in the database:

1. If the ID is a character value, the following sentence can be used to search for the largest ID value in the database, which is mostly used to manually insert the ID value:

SELECT MAX(CAST(ID AS INT)) AS ID FROM tableName

2. Forced type conversion in SQL statements:

(1) convert (data type, field name), the advantage can format date and value.

(2) cast (field name as data type), easier to use

3. Conversion function in SQL statement

(1)to_char

Example: date to character, to_char (date type field,'yyyy-mm-dd')

Common date pattern symbols:
         format symbol Description
         yyyy year
         mm Display month
         dd in numbers in the current month
         day day week
         am / pm display am / pm
         hh / hh12 / hh24 set 12 hour system / 24 hour system
         mi minutes
         ss seconds

(2) to_number is generally used to convert characters to numeric values

(3) to_date is generally used for character date to date data

 

2. Escape characters in XML files:

< <less than sign 
>> greater than sign 
& & and 
''single quotes 
" "double quotes

Guess you like

Origin blog.csdn.net/FV8023/article/details/89710165
Recommended