- 博客(16)
- 收藏
- 关注
原创 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
310
原创 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
252
原创 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
247
原创 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
335
原创 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
301
原创 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
237
原创 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
448
原创 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
214
原创 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
364
原创 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
251
原创 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
228
原创 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
304
原创 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
242
原创 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
260
原创 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
341
原创 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
186
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅