SQL Server is database management product. Released by Microsoft and name with Micorosft SQL Server Management Studio for this case I will use SQL Server 2005.
SQL Server have a utility to make table, view, trigger, store procedure, and many object the other.
This is step to make database:
1. Right click at part database and choose new database.
2. Fill at database menu for example dbStudent, at default it will make 2 file(dbStudent.mdf and dbStudent.log).
3. We can configuration like file type, initial type, autogrowth, path, or you can use a default setting.
4. Press ok and database will make by system.
The other way you can write a query syntax
"Create database [Name Database]"
For Example:
"Create database dbStudent"
This is step to make column in database:
1. At object explorer, choose tables folder and right click adn then choose new table.
2. Fill field and type of properties (for example varchar, date, double).
3. Choose save or you can press a shortcut CTRL+S and give a name of column.
The other way to create column
"Create table [Name of table]([Name Variables][Data type])"
For Example:
"Create table _studentData (No varchar(100) primary key not null,Name varchar(100))"
This is step to insert data at column:
1. Choose table you want insert data
2. After that right click and choose Open table
3. Fill data (it will save automatic if you change a row)
The other way to insert data
"Insert into [Name Table] values ([Data])"
For Example:
Insert into dbStudent values('1234','Hendry Yeah')
This is step to update data at column:
1. Choose table you want update data
2. After that right click and choose Open table
3. Fill data with new one (it will save automatic if you change a row)
The other way to update data
"Update [Name Table] set [Property]=[Data]"
For Example:
Update dbStudent set No='123', Nama='Hendry Apryanto' where No='1234'
This is step to delete data at column:
1. Choose table you want delete data
2. After that right click and choose Open table
3. Delete data (it will save automatic if you change a row)
The other way to DELETE data
"Delete from dbStudent where [Property]=[Data you want deleted]"
For Example:
Delete from dbStudent where No='123'
okay that's all friend. I hope this tutorial can help you and finnaly Congratulation you have make process data in database...^^
Wednesday, January 26, 2011
Introduction SQL Server
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment