
SQL server
我不叫康师傅
这个作者很懒,什么都没留下…
展开
-
How to get SQL server 2016
https://www.microsoft.com/en-us/download/details.aspx?id=52679 It is easy to get SQL server 2016 on Baidu or Google, or click this link to download. To set up SQL server 201原创 2016-12-02 12:43:00 · 169 阅读 · 0 评论 -
How to Use 'Exec Sp_executesql' to Read SQL String with Data Exchange(Interface)
if object_id('finaltest') is not null drop proc finaltest go create proc finaltest @student_number INT output, @lastfirst varchar(50) output, @input_原创 2016-12-05 16:14:47 · 286 阅读 · 0 评论 -
How to Use Input-type Variable
--Create Procedure-- if object_id('inputtest') is not null drop proc inputtest Go create proc inputtest --This is proc declare, NOT variable declare--原创 2016-12-02 12:58:26 · 221 阅读 · 0 评论 -
Interlude: Troubleshooting for Failed to Declare Table-type Variables
When you declare like: select * into @testitout from students or DECLARE @TESTITOUT TABLE select * into @testitout from students or原创 2016-12-02 13:01:52 · 233 阅读 · 0 评论 -
How to Use Temporary Variable
Some time, we need some variable to transfer number, date or even table. For accomplish tasks like that , I will introduce some build-in function of sql server in this instruction.原创 2016-12-02 13:00:43 · 210 阅读 · 0 评论 -
How to Use Output-type Variable
--Create Procedure-- if object_id('outputtest') is not null drop proc outputtest Go create proc outputtest --This is proc declare, NOT variable declare-- @原创 2016-12-02 12:59:25 · 276 阅读 · 0 评论 -
Interlude: Troubleshooting for 'no corresponding BEGIN TRANSACTION'
When you exec script like begin tran exec tonytest rollback tran commit tran You will see an error like Msg 3902, Level 16, State 1, Li原创 2016-12-02 12:57:09 · 407 阅读 · 0 评论 -
How to Use Procedure
SQL give you the capability to define your own procedure, Here is an example. create procedure Tonytest --after create this Procedure, you can use alter instead of create to原创 2016-12-02 12:55:30 · 195 阅读 · 0 评论 -
How to Use Cursor
Below link is a good source for learning cursors in sql http://www.cnblogs.com/moss_tan_jun/archive/2011/11/26/2263988.html And I already made a little script for example. T原创 2016-12-02 12:54:13 · 334 阅读 · 0 评论 -
Solution for Cut & Divide Text by ',' without Declare or Create Procedure
with Core as (select co.course_number, (case when termid=((substr('¶m1',1,4))-'1990') *100 then substr('¶m1',1,9) when termid=((substr('¶m1',1,4))-'1990')原创 2016-12-02 12:53:33 · 236 阅读 · 0 评论 -
Solution for calculate & Output without Declare (Useful for SQL Developer)
select t0.family_ident,ss.student_number,ss.first_name,ss.last_name,ss.grade_level,to_char(ss.DISTRICTENTRYDATE,'MM/DD/YYYY'),to_char(ust.CUST_VISAEXPIRE,'MM/DD/YYYY'),to_char(ust.CUST_PASSPORTEXPIRE,原创 2016-12-02 12:51:28 · 209 阅读 · 0 评论 -
Tips: Create An Empty Table Has Same Columns with Existed Table
Sometime we need a new empty table has same columns with existed Table to store some components in, But re-design a new table is a demanding task, then try this out! select * into原创 2016-12-02 12:46:23 · 221 阅读 · 0 评论 -
Interlude: Troubleshooting for 'Invalid object name'
When you login, and enter your first script, you may see this: Msg 208, Level 16, State 1, Line 1 Invalid object name 'ONE'. For some reason, database may not recognize原创 2016-12-02 12:47:49 · 279 阅读 · 0 评论 -
How to Create Tables
It's easy to create tables in sql server. There are 2 ways to accomplish this task. Right click Tables, in the menu, select Table. Design your table on原创 2016-12-02 12:45:37 · 235 阅读 · 0 评论 -
How to Setup A Database
When login, you will see this Please leave it by default and click Connect. Then you can see this window, then right click Databases. Give it原创 2016-12-02 12:44:29 · 315 阅读 · 0 评论 -
Try It Out! Mix Them Up! Input & Output!
Try to make a script To get full info For a random Female (or Male) student.原创 2016-12-02 13:00:02 · 318 阅读 · 0 评论