随笔分类 - SQLServer
摘要:https://stackoverflow.com/questions/26577464/how-to-find-a-table-in-sql-server-if-only-the-partial-table-name-is-known Using SSMS Object Explorer, rig
阅读全文
摘要:SET IDENTITY_INSERT (Transact-SQL) Allows explicit values to be inserted into the identity column of a table. Remarks At any time, only one table in a
阅读全文
摘要:https://flywaydb.org/documentation/database/sqlserver How Flyway works https://flywaydb.org/getstarted/how Commands Command-line: baseline SQL Server
阅读全文
摘要:OPENXML (Transact-SQL) OPENXML provides a rowset view over an XML document. Because OPENXML is a rowset provider, OPENXML can be used in Transact-SQL
阅读全文
摘要:Return Value https://docs.microsoft.com/en-us/sql/t-sql/language-elements/return-transact-sql?view=sql-server-2017 https://stackoverflow.com/questions
阅读全文
摘要:遇到如下错误 Arithmetic overflow error converting expression to data type numeric. https://stackoverflow.com/questions/33835741/round-function-and-arithmeti
阅读全文
摘要:https://docs.microsoft.com/en-us/sql/t-sql/functions/rand-transact-sql?view=sql-server-2017 在某一个区间内生成随机数 https://stackoverflow.com/questions/7878287/g
阅读全文
摘要:根据表名查找数据约束 CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE IS_DEFERRABLE INITIALLY_DEFERRED
阅读全文
摘要:https://support.microsoft.com/en-ph/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an#completeversion Build number or
阅读全文
摘要:http://www.runoob.com/sql/sql-union.html 使用sql server数据库 构造数据 查询两张表中的数据 进行union 只能对union后的结果进行排序
阅读全文
摘要:https://docs.microsoft.com/en-us/sql/ssms/visual-db-tools/create-self-joins-manually-visual-database-tools https://www.tutorialspoint.com/sql/sql-self
阅读全文
摘要:https://www.cnblogs.com/zhangchengye/p/5473860.html
阅读全文
摘要:https://stackoverflow.com/questions/37275/sql-query-for-logins https://www.mssqltips.com/sqlservertip/4299/sql-server-errors-with-drop-login-and-drop-
阅读全文
摘要:https://www.cnblogs.com/chenwolong/p/Lock.html https://www.cnblogs.com/dengshaojun/p/3955826.html https://docs.microsoft.com/en-us/sql/relational-data
阅读全文
摘要:https://stackoverflow.com/questions/1920558/what-is-the-difference-between-scope-identity-identity-identity-and-ide The @@identity function returns th
阅读全文
摘要:https://docs.microsoft.com/en-us/sql/t-sql/data-types/date-and-time-types date (Transact-SQL)datetime (Transact-SQL)datetime2 (Transact-SQL)datetimeof
阅读全文
摘要:https://docs.microsoft.com/en-us/sql/t-sql/functions/datediff-transact-sql 返回值是,用结束时间,减去开始时间
阅读全文
摘要:先从表里面筛选数据,并且添加RowNumber列,把这个筛选结果作为result 然后从result中进行二次筛选,通过pagesize和pageindex来进行分页 generate row numbers in the same order the data are added. 从表里筛选数据
阅读全文
摘要:方法1 https://stackoverflow.com/questions/2334712/how-do-i-update-from-a-select-in-sql-server 方法2 https://stackoverflow.com/questions/1068447/update-wit
阅读全文
摘要:SQL Server loop - how do I loop through a set of records By using T-SQL and cursors like this : https://stackoverflow.com/questions/28506747/sql-loop-
阅读全文