SQL Server learning road (1)

SQL Server is Microsoft's relational database, and it is a very friendly development tool for me who just started. The installation and operation of the visual interface is very suitable for me who is just getting started.

In fact, everyone is looking for information in this area and searched a lot on the Internet. I won't repeat them here, they are basically the same. I just tell about my learning path, friends who like it can learn from it.

The first person who knew about the database should be the Oracle database. I always listened to the predecessors who praised it as awesome and awesome. But as a newcomer, I must just listen to it. After all, I can only evaluate it if I have a good grasp of it. I won't comment here. Although I have used it, some functions are not used yet.

Knowing SQL Server was the first company I entered after I came to Guangzhou and started using it. I liked it the first time I used it. Maybe for us rookies, only friendly tools like this can be used and understood.

The first is the installation of this software. You only need to enter a few account passwords and click a few next steps to complete the installation. The SQL Server 2005 version was used at the beginning. At that time, the software was relatively small, and of course it has better current functions. It is not used, it is only used to query, build tables, and connect to remote databases. My boss was someone who seemed to be quite awesome at the time (maybe I was too watery at the time), he taught me a lot of SQL Server query skills, and it feels like my mentor (though in retrospect, these things are actually It's nothing). At that time, the most profound impact was the use of temporary tables. Because the data query requirements of the business system were more complex, the effect of often using sub-queries was not very satisfactory, so more often the results of sub-queries were stored in temporary tables. The most temporary table used at that time is the local temporary table (it will be recycled and released at the end of the current session). Written as follows:

SELECT * INTO #tmp FROM TABLE_A WHERE <conditional filter statement>;

Everyone will know the benefits after using it. In fact, I think the biggest advantage is that the idea will be very clear. Compared with the multi-level nesting performance of subqueries, it is also more powerful. The only certainty is that when the amount of data is relatively large, storing in a temporary table is not a wise choice. . Because I did such a thing, and ended up completely hanging up the database. So if you encounter a very large amount of data, you can try to put it in a temporary table in batches.

The use of temporary tables really helped me solve many problems encountered at work at the time. Here I want to thank my boss. Really, if someone is willing to give you pointers at work, you will feel a sense of sudden enlightenment. When you think about it, you will be very grateful to him, so if you can meet such a person when you first enter the industry, you must learn to be a human being. Don't have the momentum that the newborn calf is not afraid of tigers, or you will suffer in the end.


Guess you like

Origin blog.51cto.com/15061934/2642804