1, the query when the two fields are stitched together
-- sqlserver-- Select Filed1+'@'+fromtable--sqlite-- Select Filed1| | ' @ ' || from Table
2. Add a field using a script, change the field type, delete a field
--------Add fields------------sqlserver--IF not exists (Select * fromsyscolumnswhereId=object_id('Table name') andName='Field')BEGIN Alter TableTable nameAddFieldintEnd--sqlite--Alter TableTable nameAddFieldint--------Change the field type------------sqlserver--Alter Table Table Alter columnFilednvarchar( the)--SQLite needs to rename the old table, create a new table (this time change the field type), and then import the data into the new table, delete the old table--ALTER TABLETable name RENAME to"Rename"Create TABLE"Table name" ([Id] bigint not NULL,[Name] nvarchar( -) , Primary Key(Id))Insert into ' Renaming'([Id],[Name])Select [Id],[Name] fromMAIN.[' table name ']Drop TableMAIN.[Renaming a table]
3. Take the first few data
-- sqlsever-- SELECT TOP Ten * from Table ORDER by DESC -- sqlite-- Select * from Table 0,ten
4. Determine the insertion data
--sqlserver--IF not EXISTS(Select * from Table whereFID=6) BEGIN Insert into Table(Fname,fisdelete)Select 'T',0 END--sqlite--Insert into Table(Fname,fisdelete)Select 'TT',0 where not exists(Select * from Table whereFID=6)
SQLite differs from SQL Server