This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // person.cs | |
| using System; | |
| class Person | |
| { | |
| private string myName = "N/A"; | |
| private int myAge = 0; | |
| // Declare a Name property of type string: | |
| public string Name | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UPDATE <Tên Table> | |
| SET <thuộc tính 1 = giá trị 1>, <thuộc tính 2 = giá trị 2>,…,<thuộc tính n = giá trị n>, | |
| WHERE <điều kiện cập nhập> | |
| --VD | |
| -- Cập nhập Lương của tất cả giáo viên thành 10000 | |
| UPDATE dbo.GIAOVIEN SET LUONG = 10000 | |
| -- Cập nhập lương của tất cả giáo viên thành 10000 và địa chỉ tại DALAT | |
| UPDATE dbo.GIAOVIEN SET LUONG = 10000, DIACHI ='DALAT' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Xóa toàn bộ dữ liệu trong Table | |
| -- Cách 1 | |
| DELETE <Tên Table> | |
| -- VD | |
| DELETE dbo.HOCSINH | |
| -- Cách 2 | |
| TRUNCATE TABLE <Tên Table> | |
| --VD | |
| TRUNCATE TABLE dbo.HOCSINH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Thêm Record theo column tùy chọn | |
| INSERT INTO <Tên Table> | |
| ( column1, column2, column3, … , columnn, ) | |
| VALUES ( | |
| Gợi ký nhập dữ liệu, -- Tên column1 – kiểu dữ liệu tương ứng column1 | |
| Gợi ký nhập dữ liệu, -- Tên column2 – kiểu dữ liệu tương ứng column2 | |
| Gợi ký nhập dữ liệu, -- Tên column3 – kiểu dữ liệu tương ứng column3 | |
| … | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Thêm thuộc tính | |
| ALTER TABLE <Tên Table> ADD <Tên Column> <Kiểu dữ liệu> | |
| GO | |
| -- Sửa thuộc tính | |
| ALTER TABLE <Tên Table> | |
| ALTER COLUMN <Tên Column> <Kiểu dữ liệu cần sửa> | |
| GO | |
| --VD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Sử dụng Database SQLDBUI | |
| USE SQLDBUI | |
| --Tạo bảng SINHVIEN trong Database SQLDBUI | |
| CREATE TABLE SINHVIEN | |
| ( | |
| MASV NCHAR(10), | |
| TENSV NVARCHAR(100), | |
| KHOA NVARCHAR(100) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE <Tên Table> | |
| ( | |
| <Tên trường 1> <Kiểu dữ liệu>, | |
| <Tên trường 2> <Kiểu dữ liệu>, | |
| <Tên trường n> <Kiểu dữ liệu> | |
| ) | |
| --VD | |
| -- Tạo Table SINHVIEN có các thuộc tính MASV,TENSV,KHOA | |
| CREATE TABLE SINHVIEN | |
| ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace DemoClass | |
| { | |
| class Animal | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace HelloWorld | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| Console.WriteLine("Hello World!"); | |
| Console.ReadKey(); // Dung man hinh Console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .page-section { | |
| padding: 2rem 0; | |
| @mixin atMedium { | |
| padding: 4.5rem 0; | |
| } | |
| &--no-b-padding-until-medium { | |
| padding-bottom: 0; |
NewerOlder