Town Field Poem:
——— Dream who feel, the water month Build blog. Baiqian tribulation, only know the vicissitudes of the world.
——— today holds the Buddhist language, the technology is boundless willing to learn. Willing to do what you learn, cast a conscience blog.
——————————————————————————————————————————
1 Base Code
1 UseMaster2 Drop DatabaseHelloWorld3 4 5 --Create a database6 Create DatabaseHelloWorld7 8 9 Ten --use helloworld1 this database One UseHelloWorld A - --Create a table teacher - Create TableTeacher the ( -Idint Primary Key Identity(1,1), -Namenvarchar(Ten), -Classnchar(2), +Scorefloat - ) + A Create Table Location at ( -Classnchar(2), -Locationnvarchar(5) - ) - - --look at teacher, what's this form? in Select * fromTeacher - Select * from Location to + --insert these lines of content into this teacher, which I insert once, simply modify, and insert again - Insert intoTeacher the Values('burning lamp Ancient Buddha','Buddhist', -), *('Buddha Buddha','Buddhist', -), $('Maitreya Buddha','Buddhist', -),Panax Notoginseng('Buddha Buddha','Buddhist', -), -('nu wa Niang','Taoism', -), the('Buddhist Bodhisattva','Buddhist', -), +('The Buddha','Buddhist', -) A the --insert these lines into this location + Insert into Location - Values('Buddhist','India'), $('Taoism','China'), $('Christ','Western'), -('Confucian','China') - the --see what's in the teacher table - Select * fromTeacher
2 Table
3 Key Code
1 -- queries the average of the score column in the teacher table and displays the average on the right side of the teacher table, with the column named Averagescore 2 Select Teacher. *,AVG over as averagesocre3 from Teacher
4 show
——————————————————————————————————————————
The essence of the blog, in the technical part, more in the town yard a poem.
Sqlsever is a good language, worth studying hard. Familiar with the database of additions and deletions, write procedures necessary.
If the content of the post can be improved, or even the wrong place, please leave a comment, I will try to correct, strive to cast a conscience blog.
Note: This article is only as a scientific research study, if I inadvertently violated your rights and interests, please be sure to timely inform, I will make corrections.
Sqlsever base over with AVG, adding the mean to the right of the original table and naming the new column