Tutorial SQLServer 14

Telechargé par youcef hedibel
charvarchar
1 SQL Server Management Studio
2 New Query
3
-- =============================================
-- Database: YugoNationalBank
-- Author: FunctionX
-- Date Created: Monday 09 April 2007
-- =============================================
USE master
GO
-- Drop the database if it already exists
IF EXISTS (
SELECT name
FROM sys.databases
WHERE name = N'YugoNationalBank'
)
DROP DATABASE YugoNationalBank
GO
CREATE DATABASE YugoNationalBank
GO
SQL Server Management Studio
Set Primary Key
SQL
SQLPRIMARY
KEY
CREATE TABLE Persons
(
PersonID int identity(1,1) PRIMARY KEY NOT NULL,
FirstName varchar(20),
LastName varchar(20) NOT NULL
);
Primary Key Constraint
CONSTRAINT PrimaryKeyName PRIMARY KEY(ColumnName)
CONSTRAINTPrimary Key
PrimaryKeyName
PK_
CREATE TABLE Persons
(
PersonID int identity(1,1) NOT NULL,
FirstName varchar(20),
LastName varchar(20) NOT NULL,
CONSTRAINT PK_Persons PRIMARY KEY(PersonID)
);
GO
Foreign Key
GenderID
1
2 Relationships...
3 Foreign Key Relationships
4 FK_Foreign Key
Identity
(Name)
1 / 18 100%

Tutorial SQLServer 14

Telechargé par youcef hedibel
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !