摘要:
--显示前条数据 select top(4) * from students; --pageSize:每页显示的条数 --pageNow:当前页 select top(pageSize) * from students where sno not in (select top(pageSize*(p 阅读全文
摘要:
--部门表 create table dept( deptno int primary key,--部门编号 dname nvarchar(30),--部门名 loc nvarchar(30)--地址 ); --雇员表 create table emp( empno int primary key, 阅读全文
摘要:
基本查询: 实例表 1 示例表 2 --部门表 3 4 create table dept( 5 6 deptno int primary key,--部门编号 7 8 dname nvarchar(30),--部门名 9 10 loc nvarchar(30)--地址 11 12 ); 13 14 阅读全文
摘要:
表: 学生(*学号,姓名,性别,年龄,专业) create table student( sno char(13) primary key, sname varchar(20) not null, ssex char(2), sage smallint, sdept varchar(30) ); 课 阅读全文
摘要:
数据库和数据表 (开发常用 操作) 一,数据库的创建 一个SQLServer 是由两个文件组成的:数据文件(mdf) 和日志文件(ldf),所以我们创建数据库就是要为其指定数据库名、数据文件和日志文件。 a) create database 数据库名; 例: create database mydb 阅读全文