随笔分类 - SqlServer
摘要:SQL(Structure Query Language)语言是数据库的核心语言。SQL的发展是从1974年开始的,其发展过程如下:1974年 由Boyce和Chamberlin提出,当时称SEQUEL。1976年 IBM公司的Sanjase研究所在研制RDBMS SYSTEM R时改为SQL。19
阅读全文
摘要:基本定义: left join (左连接):返回包括左表中的所有记录和右表中连接字段相等的记录。 right join (右连接):返回包括右表中的所有记录和左表中连接字段相等的记录。 inner join (等值连接或者叫内连接):只返回两个表中连接字段相等的行。 full join (全外连接)
阅读全文
摘要:/*创建studentCourseAndTeacher数据库*/ /*create database studentCourseAndTeacher*/ /*创建Student表*/ --use studentCourseAndTeacher --go --create table Student(
阅读全文
摘要:ctrl + k + c : 注释多行 ctrl + k + u : 取消多行注释
阅读全文
摘要:创建数据库/表 /* create database studentCourse */ use studentCourse go create table Student( Sno char(6) Primary Key, Sname nvarchar(20)not null, Ssex nchar
阅读全文
摘要:/*create database studentCourse*/use studentCoursegocreate table Student( Sno char(6) Primary Key, Sname nvarchar(20)not null, Ssex nchar(1) not null
阅读全文