SQL Server quickly generates SQL addition, deletion, modification, and query statements, and SQL addition and Deletion

Source: Internet
Author: User

SQL Server quickly generates SQL addition, deletion, modification, and query statements, and SQL addition and Deletion
Are you still coding to generate SQL statements? Are you still speechless for SQL statements that are sloppy? Are you still struggling with expressing complicated SQL statements? If your answer is "yes", you will be OUT. Come and try using SQL Server Resource Manager to quickly generate SQL statements.
First, open SQL Server and find "design query in Editor" in the "query" drop-down menu on the menu bar, for example:



In the open query designer window, add the database tables to be operated.



Right-click the blank section at the bottom of the added table, and click "change type" in the pop-up menu. The sub-menu is displayed: select Insert value, update, and delete as needed.



1. Insert a value. Select the field of the value to be inserted in the added table, and add the corresponding parameter value or the value to be inserted below the table. At this time, we will notice that the SQL statement will be automatically updated at the bottom of the code box. An SQL statement that inserts a value is generated in this way. Of course, if you want to insert a record, you can simply select all fields.



2. Update the data table based on the conditions. Select the field to be updated in the operation table to be added, and then design the corresponding field value.


3. SQL query statement. Add a table or add a View to the database before this operation. (We recommend that you add all the relevant operation table fields in the database to the view, if a query statement is available in the future, you can go to this view to find the corresponding field .), Then, add the expected table or view to the query designer and select the corresponding field to be queried.




4. This is also true for deleting records.



Are you still worried about a series of SQL statements?
Taking full advantage of the experience of our predecessors, we can always learn on the shoulders of giants, which can greatly improve our learning confidence and learning efficiency. There is still a lot of knowledge and wealth waiting for us to explore slowly. Come on together ~~~

SQL Server2000 addition, deletion, modification, and query statements

Add record: insert into Table Name (column 1, column 2, column 3) values (value 1, value 2, value 3 );
Delete all table content: delete from Table Name
Delete record by ID value: delete from table name where ID = Value
Modify record: update table name set column 1 = value 1, column 2 = value 2, column 3 = value 3 where ID = Value
Query record: select * from Table Name
Query content by ID value: select * from table name where ID = Value

SQL server 2008 add, delete, modify, and query statements as detailed as possible

Hello,
It is not suitable for distributing detailed information here.
I have some study notes, which are suitable for beginners. If you want them, you can leave an email.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.