Create - DotNet and DataBase

Saturday, 11 August 2018

Create




CREATE – Creates the objects in the database. Create Query is used to create a database and its objects like database, Tables, Procedures, and Views etc...


Create a Database
Syntax:
CREATE DATABASE <DB_NAME>

Example:
CREATE DATABASE EmployeeData

Create a table
Syntax:
CREATE TABLE <Table_NAME>
(
COLUMN_NAME1 DATATYPE,
COLUMN_NAME2 DATATYPE
       Etc...
)

Example:
CREATE TABLE EmployeeInfo(
ID int NOT NULL,
EmpName VARCHAR(100),
EmpDept VARCHAR(50),
EmpLevel int,
EmpAddress VARCHAR(200),
EmpPhone bigint

)


No comments:

Post a Comment

x

Get Updates On

Discussion updates

Straight Into Your INBOX!

Enter your email address to subscribe to this website and receive notifications of new posts by email.