|
|
Posted on 2/28/2019 9:31:08 PM
|
|
|
|

preface
Last week was my first post, and I worked hard for a few hours to typeset, but when I published it, the style collapsed...... People really want to cry... In the end, I troubled the webmaster to help me rearrange it. Thank you, webmaster, Arrigado...
Following the database basics (database creation and deletion, log cleaning) in the previous article, today I will sort out the related operations of database tables.
tools
>SQL Server2017
Text
#Create a table
The results are as follows:
In this way we create two tables. So how to check how many tables are in this database:
#Query form
*Information about the inquiry form The results are as follows:
Here we can see the information about the table we just created. (The data in the query table will be explained in detail in the next topic)
* Query all fields in the table
The results are as follows:
Here we can see that there are two fields in the Test table. Of course, we can also use "select * from Test".
#Modify the table
The above are some routine operations of table fields, you can familiarize yourself with them several times. At the beginning of writing a project, the database must be designed first. Some constraints of the database and indexing will greatly improve the development efficiency of the project and reduce many unnecessary judgments in the code. For example, add a unique constraint to a field in the database. When writing code, we insert and modify it, and there is no need to make uniqueness judgments. It can make the code more concise.
#Delete the table
These are the additions, deletions, and corrections to the table. In the next issue, we will start working on the table data. I've been too busy lately, and I have studied a lot of technical points, and I don't have time to write a post, so I will slowly make up for it in the future.
|
Previous:C# parses the second mvc uses Newtonsoft.Json deserializationNext:Dependent on the use of injected Autofac
|