学习 T -SQL (2)

基于msdn 详细学习T-SQL (http://msdn.microsoft.com/zh-cn/library/bb510741.aspx)

 

2. 今天下午没什么run 分析。。。 对照着msdn 简单教程,乘机把基本的T-SQL 语句操作一遍(http://msdn.microsoft.com/zh-cn/library/ms365303.aspx)

    

Use master Go Create database dbname On Logon... Create table tablename (columnName type Null/Not Null, ...)... Insert into tablename (column1, column2, ...) Values (value1, value2,...) Select columnlist from table where ... group by... order by... computer sum... Update set columnname=... where... delete from tablename where... Create view vw_name As select ... select * from vw_name Create Procedure sp_name As Begin ... End Go Exec sp_name Go Drop view vw_name drop Procedure sp_name Drop table tablename drop database dbname

 

2010.3.11 复习 T-SQL 语句

create database Temp use temp go create table testTable ( productID int primary key NOT NULL, p2 char(50) NOT NULL ) insert into testTable (productID, p2) values (1, 'helloworld') select * from testTable update testTable set p2 = 'hello fuckers' where productID = 1 delete from testTable where productID = 1 delete from testTable drop table testTable

你可能感兴趣的:(table,null,database,delete,insert,2010)