<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
  <channel>
    <title>Kiến thức lập trình SQL &amp; MySQL</title>
    <description>Kiến thức lập trình SQL sever 2000,2005,2008, mysql, cách sử dụng database hiệu quả.</description>
    <pubDate>Tue, 09 Jun 2026 00:06:10 +0000</pubDate>
    <lastBuildDate>Tue, 09 Jun 2026 00:06:10 +0000</lastBuildDate>
    <generator>Diễn đàn CNTT | Forum CNTT Cộng đồng Tin học Việt Nam ITSEOVN</generator>
    <link>https://itseovn.com/forums/lap-trinh-sql-mysql/</link>
    <atom:link rel="self" type="application/rss+xml" href="https://itseovn.com/forums/lap-trinh-sql-mysql/index.rss"/>
    <item>
      <title>Lỗi: Error connecting to MySQL: Access denied for user ad_admin</title>
      <pubDate>Tue, 05 Mar 2024 02:43:24 +0000</pubDate>
      <link>https://itseovn.com/threads/loi-error-connecting-to-mysql-access-denied-for-user-ad_admin.328311/</link>
      <guid>https://itseovn.com/threads/loi-error-connecting-to-mysql-access-denied-for-user-ad_admin.328311/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[hi mọi người tự nhiên cái <a href="https://itseovn.com/forums/vps-hosting-linux-windows/" class="keywordReplace">vps</a> hosting của mình nó bị lỗi: Error connecting to MySQL: Access denied for user ad_admin.<br />
<br />


	<a href="https://itseovn.com/attachments/37735/" target="_blank">View attachment 37735</a>
	
<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>You won't be able to login to phpMyAdmin until you create a Database.
phpMyAdmin
Error connecting to MySQL: Access denied for user 'da_admin'@'localhost' (using password: YES)
Repair guide: http://help.directadmin.com/item.php?id=45</pre>
</div>Mình không biết nó bị gì cả, tự nhiên qua vào bình thường, hôm nay bị lỗi này.<br />
Bạn nào biết giúp mình...<br />
<br />
<a href="https://itseovn.com/threads/loi-error-connecting-to-mysql-access-denied-for-user-ad_admin.328311/" class="internalLink">Lỗi: Error connecting to MySQL: Access denied for user ad_admin</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>ERROR 1045: Access denied for user 'localhost' (using password: YES)</title>
      <pubDate>Mon, 13 Nov 2023 13:28:15 +0000</pubDate>
      <link>https://itseovn.com/threads/error-1045-access-denied-for-user-localhost-using-password-yes.327273/</link>
      <guid>https://itseovn.com/threads/error-1045-access-denied-for-user-localhost-using-password-yes.327273/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Lỗi khi import database bằng lệnh command line(import large database mysql command line) bào lỗi Access denied for user.<br />
<br />
Em xem bài này: <a href="https://itseovn.com/threads/import-large-sql-file-in-phpmyadmin-mysql-import-database-lon-trong-mysql.282246/" class="internalLink">https://itseovn.com/threads/import-...mysql-import-database-lon-trong-mysql.282246/</a><br />
<br />
Làm theo thì ở các vps khác bình thường, còn ở vps em vừa mới mua thêm thì nó báo lỗi như dưới.<br />
<br />
Lỗi: ERROR 1045 (28000): Access denied for user &#039;&#039;data_base@&#039;localhost&#039; (using password: YES)<br />
<br />
Lệnh sử dung:<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>mysql -uUser-name...</pre>
</div><a href="https://itseovn.com/threads/error-1045-access-denied-for-user-localhost-using-password-yes.327273/" class="internalLink">ERROR 1045: Access denied for user &#039;localhost&#039; (using password: YES)</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Mở port 1433 cho MS Sql Server kết nối từ xa mọi phiên bản mới nhất</title>
      <pubDate>Mon, 10 Jul 2023 09:00:13 +0000</pubDate>
      <link>https://itseovn.com/threads/mo-port-1433-cho-ms-sql-server-ket-noi-tu-xa-moi-phien-ban-moi-nhat.326089/</link>
      <guid>https://itseovn.com/threads/mo-port-1433-cho-ms-sql-server-ket-noi-tu-xa-moi-phien-ban-moi-nhat.326089/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Cách mở port 1433 kết để thực hiện việc kết nối remote từ xa trong <a href="https://itseovn.com/forums/lap-trinh-sql-mysql/" class="keywordReplace">sql</a> server 2008, 2012, 2014, 2016, 2018, 2019, 2020,.. 2022, 2023, 2024 mọi phiên bản của SQL Server trên vps Windows mới nhất hiện nay.<h2 id="opent-port-1433" class="theh2">Mở port cho phép SQL SERVER sử dụng Port 1433</h2><b><span style="font-size: 18px"><span style="color: #ff0000">Bước 1</span></span></b>: Kiểm tra xem port 1433 đã được mở chưa<br />
<ul>
<li>Truy cập vào Cmmand Prompt (CMD) của VPS và gõ lệnh sau vào kiểm tra:</li>
</ul>

<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>netstat -an -P TCP</pre>
</div><ul>
<li>...</li>
</ul><br />
<a href="https://itseovn.com/threads/mo-port-1433-cho-ms-sql-server-ket-noi-tu-xa-moi-phien-ban-moi-nhat.326089/" class="internalLink">Mở port 1433 cho MS Sql Server kết nối từ xa mọi phiên bản mới nhất</a>]]></content:encoded>
    </item>
    <item>
      <title>Trang web học mysql, kiểm tra mã mysql</title>
      <pubDate>Tue, 07 Feb 2023 06:48:10 +0000</pubDate>
      <link>https://itseovn.com/threads/trang-web-hoc-mysql-kiem-tra-ma-mysql.64477/</link>
      <guid>https://itseovn.com/threads/trang-web-hoc-mysql-kiem-tra-ma-mysql.64477/</guid>
      <author>invalid@example.com (phamcongson)</author>
      <dc:creator>phamcongson</dc:creator>
      <content:encoded><![CDATA[<b>Trang web học mysql, kiểm tra mã mysql các bạn vào trang web sau để kiểm tra</b><br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>http://www.mysql.com</pre>
</div><b>MYSQLI và MYSQL</b><br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>http://www.w3schools.com/php/php_ref_mysqli.asp</pre>
</div>]]></content:encoded>
      <slash:comments>29</slash:comments>
    </item>
    <item>
      <title>Lỗi: Could not allocate space for object trong SQL Server Code C# MCV LinQ</title>
      <pubDate>Sat, 27 Aug 2022 04:52:45 +0000</pubDate>
      <link>https://itseovn.com/threads/loi-could-not-allocate-space-for-object-trong-sql-server-code-c-mcv-linq.324953/</link>
      <guid>https://itseovn.com/threads/loi-could-not-allocate-space-for-object-trong-sql-server-code-c-mcv-linq.324953/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Chào mọi người, mình đang sử dụng code Asp.net web MVC C# lúc cập nhật dữ liệu xuống, với trường dữ liệu nTex mình lưu xuống database, lúc lưu xuống thì bị báo lỗi như sau:<br />
<br />
<b>Could not allocate space for object &#039;dbo.table_Name&#039;.&#039;PRIMARY&#039; in database &#039;DataBaseName&#039; because the &#039;PRIMARY&#039; filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.</b>...<br />
<br />
<a href="https://itseovn.com/threads/loi-could-not-allocate-space-for-object-trong-sql-server-code-c-mcv-linq.324953/" class="internalLink">Lỗi: Could not allocate space for object trong SQL Server Code C# MCV LinQ</a>]]></content:encoded>
      <slash:comments>3</slash:comments>
    </item>
    <item>
      <title>Lỗi: BACKUP LOG cannot be performed because there is no current database</title>
      <pubDate>Thu, 18 Aug 2022 01:38:48 +0000</pubDate>
      <link>https://itseovn.com/threads/loi-backup-log-cannot-be-performed-because-there-is-no-current-database.123831/</link>
      <guid>https://itseovn.com/threads/loi-backup-log-cannot-be-performed-because-there-is-no-current-database.123831/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[<b>Xử lý lỗi khi restore database trong Microsoft SQL sever Management Studio 2012 khi Restore database như sau:</b><br />



<div class="bbCodeBlock bbCodeQuote">
	<aside>
		
		<blockquote class="quoteContainer"><div class="quote">Restore of database failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)<br />
Additional information:<br />
System.data.SqlClient.SqlError: BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.SmoExtended)</div><div class="quoteExpand">Click to expand...</div></blockquote>
	</aside>
</div><div style="text-align: center">

	<a href="https://itseovn.com/attachments/13642/" target="_blank">View attachment 13642</a>
	
&#8203;</div><ul>
<li>Nguyên nhân lỗi do: bạn chọn restore trên database không...</li>
</ul><br />
<a href="https://itseovn.com/threads/loi-backup-log-cannot-be-performed-because-there-is-no-current-database.123831/" class="internalLink">Lỗi: BACKUP LOG cannot be performed because there is no current database</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Lỗi mysql Current selection does not contain a unique column edit not available</title>
      <pubDate>Thu, 18 Aug 2022 01:10:10 +0000</pubDate>
      <link>https://itseovn.com/threads/loi-mysql-current-selection-does-not-contain-a-unique-column-edit-not-available.237890/</link>
      <guid>https://itseovn.com/threads/loi-mysql-current-selection-does-not-contain-a-unique-column-edit-not-available.237890/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình bị lỗi mysql như sau:<br />
<i>Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available</i>.<br />
Thường là ở cái grid, lưới dữ liệu có thêm cột Edit, Copy và Delete, nhưng vì bị lỗi này nên nó không có các cột đó.<br />
Mình click vào sửa dữ liệu ở các ô cũng không được hiccc.<br />
<br />


	<a href="https://itseovn.com/attachments/28467/" target="_blank">View attachment 28467</a>]]></content:encoded>
      <slash:comments>3</slash:comments>
    </item>
    <item>
      <title>Lỗi 1067: The process terminated unexpectedly trên SQL 2008 và Win 10</title>
      <pubDate>Thu, 18 Aug 2022 01:07:27 +0000</pubDate>
      <link>https://itseovn.com/threads/loi-1067-the-process-terminated-unexpectedly-tren-sql-2008-va-win-10.123584/</link>
      <guid>https://itseovn.com/threads/loi-1067-the-process-terminated-unexpectedly-tren-sql-2008-va-win-10.123584/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[HI ITSEOVN hôm nay mình cài win 10 sau đó cài thằng SQL 2008, lúc cài bị báo lỗi không cài được, sau đó mình cố cài nó vào thì nó vẫn cài được bình thường không có lỗi gì sau đó.<br />
<br />
Khi cài xong mình thấy <b>SQL Server (MSSQLSERVER)</b> không được <b>Start</b> trong <b>SQL Server Configuration Manager</b>.<br />
<br />
Mình Start nó thì nó báo lỗi giống hình thứ 2 dưới.<br />
<br />


	<a href="https://itseovn.com/attachments/13622/" target="_blank">View attachment 13622</a>
	
 <br />
<br />
Lỗi: Windows could not start the OEngineServer service on Local Computer.<br />
Error 1067: The process...<br />
<br />
<a href="https://itseovn.com/threads/loi-1067-the-process-terminated-unexpectedly-tren-sql-2008-va-win-10.123584/" class="internalLink">Lỗi 1067: The process terminated unexpectedly trên SQL 2008 và Win 10</a>]]></content:encoded>
      <slash:comments>4</slash:comments>
    </item>
    <item>
      <title>SQL 2008 không cài được trên win 10</title>
      <pubDate>Thu, 18 Aug 2022 01:05:58 +0000</pubDate>
      <link>https://itseovn.com/threads/sql-2008-khong-cai-duoc-tren-win-10.123961/</link>
      <guid>https://itseovn.com/threads/sql-2008-khong-cai-duoc-tren-win-10.123961/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Hệ điều hành win 10 mới cài chạy khá OK, nhưng lại không hỗ trợ cài đặt SQL 2008 R2 là sao mọi người nhỉ, có nhiều khi mình sử dụng win 10 này không hỗ trợ được một số bản <a href="https://itseovn.com/forums/lap-trinh-phan-mem/" class="keywordReplace">phần mềm</a> cũ nên khá đau lòng hizz.]]></content:encoded>
      <slash:comments>4</slash:comments>
    </item>
    <item>
      <title>Cài đặt mặc định set Default Values giá trị cột trong SQL Server</title>
      <pubDate>Thu, 18 Aug 2022 01:01:13 +0000</pubDate>
      <link>https://itseovn.com/threads/cai-dat-mac-dinh-set-default-values-gia-tri-cot-trong-sql-server.264942/</link>
      <guid>https://itseovn.com/threads/cai-dat-mac-dinh-set-default-values-gia-tri-cot-trong-sql-server.264942/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[HI mọi người, mình muốn cài đặt mặc định giá trị 1 cột trong sql server của mình đang xài bản sql 2012 nhưng không được hizzz.<br />
Mình lên mạng mò họ chỉ:<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>ALTER TABLE Persons
ALTER COLUMN City SET DEFAULT 'giá trị';</pre>
</div>Nhưng áp dụng vô code thì không được, do các cột bảng của mình đã có sẵn rùi ý.]]></content:encoded>
      <slash:comments>6</slash:comments>
    </item>
    <item>
      <title>Thêm xóa sửa dữ liệu trong table mysql</title>
      <pubDate>Thu, 09 Sep 2021 03:48:04 +0000</pubDate>
      <link>https://itseovn.com/threads/them-xoa-sua-du-lieu-trong-table-mysql.63872/</link>
      <guid>https://itseovn.com/threads/them-xoa-sua-du-lieu-trong-table-mysql.63872/</guid>
      <author>invalid@example.com (phamcongson)</author>
      <dc:creator>phamcongson</dc:creator>
      <content:encoded><![CDATA[<div style="text-align: center"><span style="font-size: 18px"><span style="color: #0000b3"><b>Thêm xóa sửa dữ liệu trong table mysql</b></span></span>&#8203;</div><br />
<span style="color: #b30000"><b>1. Thêm(Insert) giá trị vào bảng trong mysql</b></span><br />
<ul>
<li><b>Cấu trúc</b> <b>1</b>: insert into &lt;tên bảng&gt; values(&lt;giá trị 1&gt;, &lt;giá trị 2&gt;,...) // thêm tất cả các giá trị trong 1 bảng<br />
</li>
<li><b>Cấu trúc 2: </b>insert into &lt;tên bảng&gt;(&lt;cột 1&gt;,&lt;cột 2&gt;,..) values(&lt;giá trị 1&gt;, &lt;giá trị 2&gt;,...) //tùy chỉnh giá trị cần thêm trong 1 cột</li>
</ul><b>Datatable bài tập</b>...<br />
<br />
<a href="https://itseovn.com/threads/them-xoa-sua-du-lieu-trong-table-mysql.63872/" class="internalLink">Thêm xóa sửa dữ liệu trong table mysql</a>]]></content:encoded>
      <slash:comments>3</slash:comments>
    </item>
    <item>
      <title>Trang web test code Sql Server vs MySql Online</title>
      <pubDate>Thu, 20 May 2021 07:28:49 +0000</pubDate>
      <link>https://itseovn.com/threads/trang-web-test-code-sql-server-vs-mysql-online.320426/</link>
      <guid>https://itseovn.com/threads/trang-web-test-code-sql-server-vs-mysql-online.320426/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Trang web test code cho các bạn mới học sql hoặc đã đi làm cần test web nhanh bằng mysql hoặc sql server code online khá ổn mọi người nhé. Bạn có thể đăng nhập tạo dự án test code gửi đi cũng rất thú vị.<br />
<br />
Web hỗ trợ chạy: Mysql bản 5.6, Oracle 11, PostgreSQL 9.6, SQLite, MS SQL server 2017 toàn bản mới đúng không. Bạn nào lập trình viên nên note lại cần sử dụng nhé.<br />
<br />
Link web: <a href="https://itseovn.com/redirect/?url=http://www.sqlfiddle.com/" target="_blank" class="externalLink" rel="nofollow">http://www.sqlfiddle.com/</a><br />
<br />


	<a href="https://itseovn.com/attachments/36976/" target="_blank">View attachment 36976</a>]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Raplce datetime day month year, ngày tháng năm trong Sql Server vs MySql</title>
      <pubDate>Wed, 09 Sep 2020 11:07:15 +0000</pubDate>
      <link>https://itseovn.com/threads/raplce-datetime-day-month-year-ngay-thang-nam-trong-sql-server-vs-mysql.320421/</link>
      <guid>https://itseovn.com/threads/raplce-datetime-day-month-year-ngay-thang-nam-trong-sql-server-vs-mysql.320421/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Bài viết được hỗ trợ bởi <a href="https://itseovn.com/members/1/" class="username" data-user="1, @admin">@admin</a> đã giúp mình code, nên mình post lại ở đây.<br />
<br />
Ví dụ dưới đây chỉ các bạn cách đổi tháng và năm giữ nguyên ngày giờ của dữ liệu datetime, hiện tại mình có trường CreateTime, mình muốn đổi tất cả trường này thành các năm và tháng mới, giữ nguyên day ngày giờ cũ.<br />
<br />
<span style="font-size: 18px"><b>Trong SQL Server</b></span><br />
<br />
<b>Lệnh select xem dữ liệu</b><br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
select convert(datetime, '2020-08-' + CAST(DAY(CreateTime) AS varchar) + ' ' +...</pre>
</div><a href="https://itseovn.com/threads/raplce-datetime-day-month-year-ngay-thang-nam-trong-sql-server-vs-mysql.320421/" class="internalLink">Raplce datetime day month year, ngày tháng năm trong Sql Server vs MySql</a>]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Khác biệt giữa Inner Join (left join) và Outer Join (right join) trong SQL server</title>
      <pubDate>Sat, 29 Aug 2020 02:29:33 +0000</pubDate>
      <link>https://itseovn.com/threads/khac-biet-giua-inner-join-left-join-va-outer-join-right-join-trong-sql-server.174564/</link>
      <guid>https://itseovn.com/threads/khac-biet-giua-inner-join-left-join-va-outer-join-right-join-trong-sql-server.174564/</guid>
      <author>invalid@example.com (phamcongson)</author>
      <dc:creator>phamcongson</dc:creator>
      <content:encoded><![CDATA[<b>1. Inner join hay còn gọi là left join</b><br />
<ul>
<li>Lấy tất cả các bảng bên trái (Products) -&gt; kết nối với bảng bên phải (Categories)</li>
<li>Cột nào bên trái (Products) có giá trị mới lấy kết nối qua cột bên phải (Categories)</li>
</ul>

<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
select c.NameVN 'Category',p.Name 'Product'
from Products p
   join Categories c on c.Id=p.CategoryId
</pre>
</div><b>2. Outer join hay còn gọi là right join </b><br />
<ul>
<li>Lấy tất cả các bảng bên phải (Categories) -&gt; kết nối với bảng bên trái (Products)...</li>
</ul><br />
<a href="https://itseovn.com/threads/khac-biet-giua-inner-join-left-join-va-outer-join-right-join-trong-sql-server.174564/" class="internalLink">Khác biệt giữa Inner Join (left join) và Outer Join (right join) trong SQL server</a>]]></content:encoded>
      <slash:comments>16</slash:comments>
    </item>
    <item>
      <title>Phím tắt Ctrl+R không hoạt động trong sql server 2012 2014 2016</title>
      <pubDate>Sat, 15 Aug 2020 02:38:34 +0000</pubDate>
      <link>https://itseovn.com/threads/phim-tat-ctrl-r-khong-hoat-dong-trong-sql-server-2012-2014-2016.157347/</link>
      <guid>https://itseovn.com/threads/phim-tat-ctrl-r-khong-hoat-dong-trong-sql-server-2012-2014-2016.157347/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Lỗi các phím tắt trong SQL không hoạt động hoặc bị thay đổi &quot;<b>Phím tắt Ctrl+R không hoạt động trong sql server 2008 2012 2014 2016,... và các phiên bản khác của SQL Management Studio xxxx (SSMS)</b>&quot;<br />
<br />
<span style="font-size: 18px"><span style="color: #b30000"><b>1. Lỗi :</b></span></span> Khi nhấn tổ hợp phím Ctrl+R khi chạy lệnh t-sql nhận được kết quả như sau dưới thanh Status Bar SQL:<br />
<br />


	<a href="https://itseovn.com/attachments/19001/" target="_blank">View attachment 19001</a>
	
<br />
<br />
Thực hiện ấn tiếp tổ hợp phím Ctrl+R thì hiện tiếp thông báo sau:<br />
<br />


	<a href="https://itseovn.com/attachments/19002/" target="_blank">View attachment 19002</a>
	
<br />
<br />
Vào Menu...<br />
<br />
<a href="https://itseovn.com/threads/phim-tat-ctrl-r-khong-hoat-dong-trong-sql-server-2012-2014-2016.157347/" class="internalLink">Phím tắt Ctrl+R không hoạt động trong sql server 2012 2014 2016</a>]]></content:encoded>
      <slash:comments>8</slash:comments>
    </item>
    <item>
      <title>Shrink Log Database giảm dung lượng file log trong SQL server</title>
      <pubDate>Fri, 14 Aug 2020 01:48:14 +0000</pubDate>
      <link>https://itseovn.com/threads/shrink-log-database-giam-dung-luong-file-log-trong-sql-server.317771/</link>
      <guid>https://itseovn.com/threads/shrink-log-database-giam-dung-luong-file-log-trong-sql-server.317771/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Cho mình xin cách shrink Log Database giảm dung lượng file log trong SQL server với ạ, Mình có dùng sql server 2014 hiện tại dung lượng lên tới 3GB, mà file Log nó nặng tới gần 3GB hicc, giờ mình không biết làm sao để giảm bớt dung lượng database log file nó đi, bạn nào biết cách shrink log file database để giảm bớt dung lượng cho mình xin với.<br />
Cảm ơn]]></content:encoded>
      <slash:comments>4</slash:comments>
    </item>
    <item>
      <title>Select size Database kích thước database table trong SQL server như thế nào?</title>
      <pubDate>Mon, 03 Aug 2020 14:41:07 +0000</pubDate>
      <link>https://itseovn.com/threads/select-size-database-kich-thuoc-database-table-trong-sql-server-nhu-the-nao.317769/</link>
      <guid>https://itseovn.com/threads/select-size-database-kich-thuoc-database-table-trong-sql-server-nhu-the-nao.317769/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[xin câu lệnh Select size Database, kiểm kích thước dung lượng database hiện tại trong SQL server như thế nào? hiện tại mình toàn tải nó về thì biết dung lượng của nó, giờ mình muốn kiểm tra trực tiếp thì xem nó như thế nào bạn nào biết câu lệnh giúp mình với, cảm ơn.<br />
Cho mình hỏi lun, có câu lệnh nào đó kiểm tra từng table dung lượng bao nhiêu lun có không cho mình lun. select size table in sql?]]></content:encoded>
      <slash:comments>5</slash:comments>
    </item>
    <item>
      <title>Thêm thuộc tính Cột IDENTITY trong SQL Server</title>
      <pubDate>Mon, 03 Aug 2020 14:39:03 +0000</pubDate>
      <link>https://itseovn.com/threads/them-thuoc-tinh-cot-identity-trong-sql-server.141472/</link>
      <guid>https://itseovn.com/threads/them-thuoc-tinh-cot-identity-trong-sql-server.141472/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[<div style="text-align: center"><span style="font-size: 18px"><span style="color: #b30000"><b>Thêm thuộc tính Cột IDENTITY trong SQL Server</b></span></span>&#8203;</div><br />
<span style="color: #0000b3"><b>1. Cột IDENTITY </b></span><br />
<ul>
<li>Dùng để tạo một dãy số liên tục tăng cho mỗi bản ghi được INSERT, nó rất thích hợp khi bạn cần có một cột mà mỗi lần INSERT giá trị của nó được tự động tăng lên cao hơn các giá trị trước đó, trong khi bạn không quan tâm nhiều lắm đến bản thân các giá trị trong cột này. Trong rất nhiều trường hợp, cột IDENTITY cũng được dùng luôn...</li>
</ul><br />
<a href="https://itseovn.com/threads/them-thuoc-tinh-cot-identity-trong-sql-server.141472/" class="internalLink">Thêm thuộc tính Cột IDENTITY trong SQL Server</a>]]></content:encoded>
      <slash:comments>13</slash:comments>
    </item>
    <item>
      <title>Insert sao chép dữ liệu table từ database này sang database khác như thế nào?</title>
      <pubDate>Sun, 28 Jun 2020 17:42:56 +0000</pubDate>
      <link>https://itseovn.com/threads/insert-sao-chep-du-lieu-table-tu-database-nay-sang-database-khac-nhu-the-nao.319839/</link>
      <guid>https://itseovn.com/threads/insert-sao-chep-du-lieu-table-tu-database-nay-sang-database-khac-nhu-the-nao.319839/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Insert sao chép dữ liệu table từ database này sang database khác như thế nào mọi người ai biết không? ví dụ mình có cái database bhxhbg_new mình muốn chuyển cái bảng tb_product sang table bhxhbg_db cũng có bảng tb_product y chang vậy thì làm như thế nào?<br />
<br />
Trong tiếng anh: INSERT INTO table of database from another database. bạn nào biết giúp mình cách insert into dữ liệu của 1 bảng ở database này sang 1 bảng khác của database khác thì giúp mình với<br />
<br />


	<a href="https://itseovn.com/attachments/36757/" target="_blank">View attachment 36757</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Xóa Restricted User sau database trong SQL Server như thế nào</title>
      <pubDate>Sun, 28 Jun 2020 14:04:28 +0000</pubDate>
      <link>https://itseovn.com/threads/xoa-restricted-user-sau-database-trong-sql-server-nhu-the-nao.319837/</link>
      <guid>https://itseovn.com/threads/xoa-restricted-user-sau-database-trong-sql-server-nhu-the-nao.319837/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Xóa <b>Restricted User</b> sau database trong SQL Server như thế nào vậy mọi người, mình có thực hiện restore 1 database dạng .bak vào lại Databases thì bị lỗi như hình dưới, nó vẫn vô được bình thường mà có thêm cái phía sau có chữ: Restricted User không biết có ảnh hưởng gì không, làm sao để xóa nó đi để hiện thì bình thường như các database khác, cảm ơn.<br />
<br />


	<a href="https://itseovn.com/attachments/36755/" target="_blank">View attachment 36755</a>]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Check Transaction Log Size in a SQL Server dung lượng log như thế nào?</title>
      <pubDate>Mon, 30 Mar 2020 15:46:45 +0000</pubDate>
      <link>https://itseovn.com/threads/check-transaction-log-size-in-a-sql-server-dung-luong-log-nhu-the-nao.317764/</link>
      <guid>https://itseovn.com/threads/check-transaction-log-size-in-a-sql-server-dung-luong-log-nhu-the-nao.317764/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Cho mình hỏi làm sao để kiểm tra dung lượng Log SQL server, Transaction Log Size in a SQL Server như thế nào vậy? Mình xài nhiều câu lệnh mà chưa ra dung lượng chính xác của nó, bạn nào biết giúp mình với.]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>SQL Server CONVERT() Function Datetime</title>
      <pubDate>Mon, 16 Mar 2020 11:55:46 +0000</pubDate>
      <link>https://itseovn.com/threads/sql-server-convert-function-datetime.193/</link>
      <guid>https://itseovn.com/threads/sql-server-convert-function-datetime.193/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[<b>Definition and Usage</b><br />
<br />
<span style="color: #404040"><span style="font-family: 'verdana'">The CONVERT() function is a general function that converts an expression of one data type to another.</span></span><br />
<span style="color: #404040"><span style="font-family: 'verdana'">The CONVERT() function can be used to display date/time data in different formats.</span></span><br />
<b>Syntax</b><br />
<br />
<span style="color: #444444"><span style="font-family: 'verdana'"><span style="font-family: 'courier new'">CONVERT(<i>data_type(length)</i>,<i>expression</i>,<i>style</i>)</span><br />
</span></span><br />
<br />
[TABLE=&quot;class: reference notranslate,...<br />
<br />
<a href="https://itseovn.com/threads/sql-server-convert-function-datetime.193/" class="internalLink">SQL Server CONVERT() Function Datetime</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Convert cách chuyển số dương thành số âm trong sql server như thế nào?</title>
      <pubDate>Mon, 16 Mar 2020 11:53:58 +0000</pubDate>
      <link>https://itseovn.com/threads/convert-cach-chuyen-so-duong-thanh-so-am-trong-sql-server-nhu-the-nao.306078/</link>
      <guid>https://itseovn.com/threads/convert-cach-chuyen-so-duong-thanh-so-am-trong-sql-server-nhu-the-nao.306078/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Convert cách chuyển số dương thành số âm trong sql server như thế nào? tại mình có 1 danh sách dữ liệu, mình muốn lấy cột số lượng theo ID sản phẩm, và update vào bảng khác với số lượng tương ứng, nhưng muốn convert chuyển số lượng thành thành số ấm nếu &gt; 0 thì làm như thế nào?<br />
VD: mình có prouductid = 10, giá trị số lượng ở bảng này là 20 ở bảng chính là bảng tb_Product, mình muốn insert vào bảng tb_productTemap giá trị cột Quantity là giá trị âm tương tự thì làm như thế nào?<br />
cảm ơn]]></content:encoded>
      <slash:comments>9</slash:comments>
    </item>
    <item>
      <title>Cách restore database file .tmp .bak .trn trong sql server mới nhất</title>
      <pubDate>Mon, 16 Mar 2020 11:51:12 +0000</pubDate>
      <link>https://itseovn.com/threads/cach-restore-database-file-tmp-bak-trn-trong-sql-server-moi-nhat.132883/</link>
      <guid>https://itseovn.com/threads/cach-restore-database-file-tmp-bak-trn-trong-sql-server-moi-nhat.132883/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[<b>Hướng chi tiết tỷ mỷ cách restore database file .tmp .bak .trn trong sql server mới nhất hiện nay trên SQL 2012 và các bản SQL 2014, 2016, 2017 tương tự nhé.</b><br />
<br />
Nhiều khi các bạn backup từ server hosting web về, thấy database có dạng .tmp khá lạ, không biết làm sao với file này, vì trước giờ bạn backup tại local toàn ra file .bak, nên hôm nay mình hướng dẫn lại các bạn restore file .tmp và .bak, .trn chi tiết trên bản SQL server 2012 như sau (<i>các bản khác tương tự</i>)<br />
<ul>
<li>...</li>
</ul><br />
<a href="https://itseovn.com/threads/cach-restore-database-file-tmp-bak-trn-trong-sql-server-moi-nhat.132883/" class="internalLink">Cách restore database file .tmp .bak .trn trong sql server mới nhất</a>]]></content:encoded>
      <slash:comments>9</slash:comments>
    </item>
    <item>
      <title>Cách replace ntext trong sql server</title>
      <pubDate>Mon, 16 Mar 2020 11:48:35 +0000</pubDate>
      <link>https://itseovn.com/threads/cach-replace-ntext-trong-sql-server.193508/</link>
      <guid>https://itseovn.com/threads/cach-replace-ntext-trong-sql-server.193508/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Để replace 1 chuỗi Ntext, nếu replace thay thế thông thường ta sẽ không thể làm được và bị báo lỗi <b>&quot;Argument data type ntext is invalid for argument 1 of replace function</b>&quot;. Để thay thế dữ liệu gì đó nằm trong 1 chuỗi Ntext của SQL server thì làm như sau:<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
cast(replace(cast(myNtext as nvarchar(max)),'find','text_replace') as ntext)
</pre>
</div><ul>
<li>Với myNtext: là cột dữ liệu lấy để thay thế<br />
</li>
<li>find : là ký tự, chuỗi ký tự cần tìm để thay thế.<br />
</li>
<li>text_replace : dữ liệu cần...</li>
</ul><br />
<a href="https://itseovn.com/threads/cach-replace-ntext-trong-sql-server.193508/" class="internalLink">Cách replace ntext trong sql server</a>]]></content:encoded>
      <slash:comments>12</slash:comments>
    </item>
    <item>
      <title>Cách convert datetime dạng dd/MM/YYYY hh:mm:ss trong SQL server</title>
      <pubDate>Mon, 16 Mar 2020 11:43:35 +0000</pubDate>
      <link>https://itseovn.com/threads/cach-convert-datetime-dang-dd-mm-yyyy-hh-mm-ss-trong-sql-server.225185/</link>
      <guid>https://itseovn.com/threads/cach-convert-datetime-dang-dd-mm-yyyy-hh-mm-ss-trong-sql-server.225185/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Hi Mọi người, hướng đẫn giúp mình convert cái kiểu thời gian datetime thành dạng <b>dd/MM/YYYY hh:mm:ss</b> ví dụ : 20/01/1992 02:20:42 giúp mình với. Mình convert(datetime,getdate(),103), convert(datetime,getdate(),120) đều không được. Mình convert dạng convert(nvarhcar,getdate(),103)  thì ra nhưng nó không có giờ phút giây. Giúp mình với.<br />
Cảm ơn. Mình sử dụng SQL server 2012.]]></content:encoded>
      <slash:comments>6</slash:comments>
    </item>
    <item>
      <title>Hướng dẫn generate script backup file .sql tất cả databases sql server 2014</title>
      <pubDate>Sun, 15 Mar 2020 03:53:45 +0000</pubDate>
      <link>https://itseovn.com/threads/huong-dan-generate-script-backup-file-sql-tat-ca-databases-sql-server-2014.181934/</link>
      <guid>https://itseovn.com/threads/huong-dan-generate-script-backup-file-sql-tat-ca-databases-sql-server-2014.181934/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Hướng dẫn generate script backup sang dạng file .sql tất cả databases sql server 2014 vào chung 1 file sql. Backup dưới dạng .sql giúp có thể restore ra ở các loại phiên bản sql khác nhau. VD: bạn đang sử dụng sql 2014 nếu backup dạng .bak sẽ không up được trên các phiên bản sql 2008 và 2012. Nhưng khi bạn sử dụng cách này bạn có thể up ở mọi phiên bản 2012, 2010, 2008, 2005,..<br />
<br />
<span style="color: #b30000"><b>Cách : generate script backup sang dạng file .sql tất cả databases sql server 2014 như...</b></span><br />
<br />
<a href="https://itseovn.com/threads/huong-dan-generate-script-backup-file-sql-tat-ca-databases-sql-server-2014.181934/" class="internalLink">Hướng dẫn generate script backup file .sql tất cả databases sql server 2014</a>]]></content:encoded>
      <slash:comments>6</slash:comments>
    </item>
    <item>
      <title>Lỗi : drop database statements are disabled cách xử lý</title>
      <pubDate>Wed, 25 Dec 2019 02:23:35 +0000</pubDate>
      <link>https://itseovn.com/threads/loi-drop-database-statements-are-disabled-cach-xu-ly.78702/</link>
      <guid>https://itseovn.com/threads/loi-drop-database-statements-are-disabled-cach-xu-ly.78702/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Khi mình xóa 1 database trong MYSQL thì bị lỗi &quot;drop database statements are disabled&quot; khiến mình xóa database này không được?<br />
<br />
<div style="text-align: center"><i>

	<a href="https://itseovn.com/attachments/7915/" target="_blank">View attachment 7915</a>
	
 <br />
<br />
drop database statements are disabled</i>&#8203;</div><br />
Database bị trùng tên, muốn xóa đi, chèn database khác vào không được, bạn nào biết cách xử lý giúp với.<br />
<br />
Cảm ơn ITSEOVN]]></content:encoded>
      <slash:comments>5</slash:comments>
    </item>
    <item>
      <title>The SQL SELECT DISTINCT Statement, DISTINCT trong sql server 2005, 2008</title>
      <pubDate>Mon, 16 Dec 2019 09:00:01 +0000</pubDate>
      <link>https://itseovn.com/threads/the-sql-select-distinct-statement-distinct-trong-sql-server-2005-2008.228/</link>
      <guid>https://itseovn.com/threads/the-sql-select-distinct-statement-distinct-trong-sql-server-2005-2008.228/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[<div style="text-align: center"><b>Câu lệnh SELECT DISTINCT trong SQL</b>&#8203;</div><br />
<span style="font-family: 'Tahoma'"><span style="font-size: 15px">Trong  một bảng dữ liệu table, một column(cột) có thể bị trùng dữ liệu và đôi khi bạn chỉ muốn liệt kê 1 danh sách riêng biệt không trùng lặp, khi đó bạn có thể sử dụng từ khóa DISTINCT để lấy ra các giá trị này.<br />
<br />
<b>Câu lệnh SQL SELECT DISTINCT.</b><br />
<br />



<div class="bbCodeBlock bbCodeQuote">
	<aside>
		
		<blockquote class="quoteContainer"><div class="quote"><span style="color: rgb(68, 68, 68)">SELECT DISTINCT <i>column_name</i>,<i>column_name</i><br />
FROM <i>table_name</i>;<br />
</span></div><div class="quoteExpand">Click to expand...</div></blockquote>
	</aside>
</div><b>Demo Database câu...</b></span></span><br />
<br />
<a href="https://itseovn.com/threads/the-sql-select-distinct-statement-distinct-trong-sql-server-2005-2008.228/" class="internalLink">The SQL SELECT DISTINCT Statement, DISTINCT trong sql server 2005, 2008</a>]]></content:encoded>
      <slash:comments>5</slash:comments>
    </item>
    <item>
      <title>Cách sử dụng CURSOR trong SQL Server, vòng lặp while trong MS-SQL</title>
      <pubDate>Fri, 22 Nov 2019 09:05:49 +0000</pubDate>
      <link>https://itseovn.com/threads/cach-su-dung-cursor-trong-sql-server-vong-lap-while-trong-ms-sql.141514/</link>
      <guid>https://itseovn.com/threads/cach-su-dung-cursor-trong-sql-server-vong-lap-while-trong-ms-sql.141514/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[<b>1. CURSOR là gì?</b><br />
<ul>
<li>Trong c# khi duyệt dữ liệu ta có vòng lặp while, for, do while,.. để duyệt dữ liệu mảng, còn trong SQL Server ta dó vòng lặp Coursor while để duyệt dữ liệu mảng.</li>
</ul><div style="text-align: center">

	<a href="https://itseovn.com/attachments/16497/" target="_blank">View attachment 16497</a>
	
<br />
Coursor trong SQL Server&#8203;</div><br />
<b>2. Cách sử dụng vong lặp Coursor</b><br />
<ul>
<li>Xem qua ví dụ và đọc chú giải dưới để hiểu rõ hơn.</li>
</ul>

<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
declare mycs cursor for select col1,col2 from tbl_mytable
open mycs
declare @mycol1 nvarchar(100)
declare...</pre>
</div><a href="https://itseovn.com/threads/cach-su-dung-cursor-trong-sql-server-vong-lap-while-trong-ms-sql.141514/" class="internalLink">Cách sử dụng CURSOR trong SQL Server, vòng lặp while trong MS-SQL</a>]]></content:encoded>
      <slash:comments>11</slash:comments>
    </item>
  </channel>
</rss>
