Creating, altering and dropping a database - Charter 2





To create the database graphically
1. Right Click on Databases folder in the Object explorer
2. Select New Database
3. In the New Database dialog box, enter the Database name and click OK.



1.-Creating a database



To Create the database using a query
Create database DatabaseName


















We can choose edit  to add some data or choose a 100 row to see what we created







we choose to start from scratch and delete the previous command when we choose new query

2.-INSERT STATEMENT

We will use the insert statement to insert some data!

Inset into Customer
(FirstName,LastName,[age])
values ('Sammy','Sosa',45);





if we found any red mark we will run intellisense on edit tab we will run it 





we can see it's created





We can choose to run the whole statement or the highlighted only..in this case we will run the last two



Here is the results






Now you know how to Inser some data in your tables in SQL  !

____________________________________________



Whether, you create a database graphically using the designer or, using a query, the following 2 files gets generated.
.MDF file - Data File (Contains actual data)
.LDF file - Transaction Log file (Used to recover the database)







Creating, altering and dropping a database - Charter 2 Creating, altering and dropping a database   - Charter 2 Reviewed by ohhhvictor on 6:22 PM Rating: 5

No comments:

 photo imagen120.jpg
Theme images by 5ugarless. Powered by Blogger.