摘要:
http://blog.sqlauthority.com/2007/08/15/sql-server-insert-data-from-one-table-to-another-table-insert-into-select-select-into-table/SQL SERVER – Insert Data From One Table to Another Table – INSERT INTO SELECT – SELECT INTO TABLEAugust 15, 2007 by pinaldaveFollowing three questions are many time as. 阅读全文
摘要:
http://blog.sqlauthority.com/2007/09/13/sql-server-difference-between-exec-and-execute-vs-exec-use-execexecute-for-sp-always/SQL SERVER – Difference Between EXEC and EXECUTE vs EXEC() – Use EXEC/EXECUTE for SP alwaysSeptember 13, 2007 by pinaldaveWhat is the difference between EXEC and EXECUTE?They. 阅读全文
摘要:
ORDER BY items must appear in the select list if the statement contains a UNION, INTERSECT or EXCEPT operator.Solution 1:To fix this problem I put my Union statement into a derived table by doing the following.SELECT * FROM (SELECT Column1, Column2 FROM Table_AUNION ALLSELECT Column1, Column2 FROM . 阅读全文
摘要:
LTRIM:http://msdn.microsoft.com/en-us/library/aa933237(v=sql.80).aspxLEFT (Transact-SQL) http://msdn.microsoft.com/en-us/library/ms177601.aspxRIGHT (Transact-SQL): http://msdn.microsoft.com/en-us/library/ms177532.aspxCHARINDEX (Transact-SQL) http://msdn.microsoft.com/en-us/library/ms186323.aspxPrin. 阅读全文
摘要:
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htmHow to pass a list of values or array to SQL Server stored procedure?Note: Information & code samples from this article are tested on SQL Server 2005 RTM (Yukon) and found to be working. Will update the article in case of any compat 阅读全文