摘要:
SQL Server主键的写法:--列级create table dept(dept_no int primary key,dept_name nvarchar(20) not null)--表级create table dept(dept_no int not null,dept_name nva... 阅读全文
摘要:
SQL Server中主外键的定义:1.create table dept(dept_no int primary key,dept_name nvarchar(50) not null)insert into dept values(10,'IT'),(20,'Finance'),(30,'Eng... 阅读全文
摘要:
一个数据库中可能有很多表,而我想全部删除,如果一个一个手动删除太麻烦而且浪费时间。涉及两个问题:1.如何知道这个数据库里有哪些表?2.如何把这些表名读取出来?这两个问题解决了,就方便多了。第一个问题:select name from sysobjectswhere xtype='U'sysobjec... 阅读全文