{"id":3907,"date":"2023-06-21T13:17:06","date_gmt":"2023-06-21T13:17:06","guid":{"rendered":"https:\/\/wiki.thomasandsofia.com\/?p=3907"},"modified":"2023-06-27T11:52:31","modified_gmt":"2023-06-27T11:52:31","slug":"mssql","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=3907","title":{"rendered":"MSSQL"},"content":{"rendered":"<p><a href=\"https:\/\/www.youtube.com\/watch?v=lo80Q8C0nXk\" target=\"_blank\" rel=\"noopener\">SQL Server Crash Course<\/a><\/p>\n<p>1:24:00<\/p>\n<p>Connect:<\/p>\n<pre>C:\\&gt;sqlcmd -S &lt;instance&gt;\\&lt;username&gt;<\/pre>\n<p>Basic Commands<\/p>\n<p>* sp = stored procedure<\/p>\n<pre>&gt; sp_databases\r\n&gt; go<\/pre>\n<h2>Backup Files<\/h2>\n<pre>C:\/Program Files\/Microsoft SQL Server\/MSSQL15...\/MSSQL\/Backup<\/pre>\n<h3>Restore Backup File<\/h3>\n<ol>\n<li>SSMS &gt; Databases (rclick) &gt; Restore Database&#8230;<\/li>\n<li>Source = Device [elipse menu]<\/li>\n<li>Select backup devices\n<ol>\n<li>Backup media type: File<\/li>\n<li>Backup media: [Add]<\/li>\n<li>Select .bak file<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h1>Query Order<\/h1>\n<ol>\n<li>SELECT<\/li>\n<li>FROM<\/li>\n<li>WHERE<\/li>\n<li>GROUP BY<\/li>\n<li>HAVING<\/li>\n<li>ORDER BY<\/li>\n<\/ol>\n<h2>Processing Order:<\/h2>\n<p>FROM &gt; WHERE &gt; GROUP BY &gt; HAVING &gt;SELECT &gt; ORDER BY<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL Server Crash Course 1:24:00 Connect: C:\\&gt;sqlcmd -S &lt;instance&gt;\\&lt;username&gt; Basic Commands * sp = stored procedure &gt; sp_databases &gt; go Backup Files C:\/Program Files\/Microsoft SQL Server\/MSSQL15&#8230;\/MSSQL\/Backup Restore Backup File SSMS &gt; Databases (rclick) &gt; Restore Database&#8230; Source = Device [elipse menu] Select backup devices Backup media type: File Backup media: [Add] Select .bak file Query ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=3907\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81],"tags":[],"class_list":["post-3907","post","type-post","status-publish","format-standard","hentry","category-mssql"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/3907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3907"}],"version-history":[{"count":6,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/3907\/revisions"}],"predecessor-version":[{"id":3913,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/3907\/revisions\/3913"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}