In this video I have shown how to create database in SQL Server 2012.To Log in into SQL Server you can use windows authentication or SQL authentication.
If you use windows authentication then you can enter into SQL Server engine using just only .(dot) in the server name , no need to input any password. Login: sa and Password: ‘Any’
Otherwise if you use SQL Authentication Mode then you have to enter
To Create, rename and delete database we can use sql script and design view. Here have written the syntax for all the operation
Create :
Create database DatabaseName
Rename:
Alter Database OldName Modify Name=NewName
Another way using Store procedure:
EXEC Sp_renameDB ‘OldName’,’NewName’
For use Database :
Use DatabaseName
To See All database information:
EXEC sp_helpdb
To see specific database information:
EXEC sp_helpdb DatabaseName
To Delete database:
Drop Database DatabaseName
Some Important things to Know: When you are already using any database, will could not delete this database. You have to use another database, then you can drop the database.
In design view you can rename and delete when using same database.
-- To see all database information in SQLServer
EXEC sp_helpdb
Go
-- To see specific database information in SQLServer
EXEC sp_helpdb SampleDB
Go
--Open / Use a Database
USE SampleDB
Go
-- To rename a database
Alter Database SampleDB Modify Name=FinalDB
Go
-- To see is it renamed or not
EXEC sp_helpdb FinalDB
GO
-- Another way to modify database name
EXEC Sp_renameDB 'FinalDB','SampleDB'
Go
-- To see is it renamed or not
EXEC sp_helpdb SampleDB
GO
-- To delete database
Drop Database SampleDB
Go
To find the code I have written in this video, join to our facebook group by clicking following link:
/ 2601558879886333
You can also like to our facebook Page to get all video code clicking on following link:
https://www.facebook.com/permalink.ph...
You can follow us on twitter clicking on following link:
/ itsolut62078624
We will create thousands of video related with information technology from our practical experience and those are used in our daily work and development. Stay with us.
Do like, share and comments and subscribe to my channel and click on bell button to get notification when new video uploaded. You may suggest me to make new video with new topic.
My Channel Subscription link:
/ @itsolution8998
Thanks again
Auf dieser Seite können Sie das Online-Video How to Create Database in SQL Server by SQL Script and design view mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer ITSolution 20 Januar 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 32 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!