Hướng dẫn SQL

TRANG CHỦ SQL Giới thiệu SQL Cú pháp SQL Lựa chọn SQL SQL Chọn phân biệt SQL ở đâu SQL Và, Hoặc, Không Đặt hàng SQL theo Chèn SQL vào Giá trị rỗng trong SQL Cập nhật SQL SQL Delete SQL Select Top SQL Min và Max Số lượng SQL, Trung bình, Tổng SQL như Ký tự đại diện SQL SQL trong SQL giữa Bí danh SQL SQL tham gia Tham gia bên trong SQL SQL còn lại tham gia SQL Right Join Tham gia đầy đủ SQL SQL tự tham gia SQL Union Nhóm SQL bởi SQL có SQL tồn tại SQL Bất kỳ, Tất cả SQL chọn vào Chèn SQL vào vùng chọn Trường hợp SQL Hàm Null trong SQL Thủ tục lưu trữ SQL Nhận xét SQL Toán tử SQL

Cơ sở dữ liệu SQL

SQL Tạo cơ sở dữ liệu SQL Drop DB Cơ sở dữ liệu sao lưu SQL SQL Tạo bảng Bảng thả SQL Bảng thay thế SQL Các ràng buộc SQL SQL không rỗng SQL duy nhất Khóa chính SQL Khóa ngoại SQL Kiểm tra SQL SQL mặc định Chỉ mục SQL Tăng tự động SQL SQL Dates Chế độ xem SQL SQL Injection Lưu trữ SQL Các kiểu dữ liệu SQL

Tham chiếu SQL

Từ khóa SQL Các chức năng của MySQL Các chức năng của SQL Server Chức năng MS Access Tham khảo nhanh SQL

Ví dụ về SQL

Ví dụ về SQL Câu hỏi SQL Bài tập SQL Chứng chỉ SQL

Hàm Định dạng MS Access ()

Thí dụ

Định dạng cột "Ngày sinh" thành một ngày dài:

SELECT Format(BirthDate, "Long Date") AS FormattedBirthDate
FROM Employees;

Định nghĩa và Cách sử dụng

Hàm Format () định dạng giá trị ngày tháng với định dạng được chỉ định.

Cú pháp

Format(value, format, firstdayofweek, firstweekofyear)

Giá trị tham số

Parameter Description
value Required. The date value to format
format Optional. The format to use.
Format Description
General Date Shows value as a date based on the system settings
Long Date Shows value as a date based on the system's long date settings
Medium Date Shows value as a date based on the system's medium date settings
Short Date Shows value as a date based on the system's short date settings
Long Time Shows value as a date based on the system's long time settings
Medium Time Shows value as a date based on the system's medium time settings
Short Time Shows value as a date based on the system's short time settings
firstdayofweek Optional. Specifies the first day of the week. Can be one of the following values:
  • 0 = Use the NLS API setting
  • 1 = Sunday (this is default)
  • 2 = Monday
  • 3 = Tuesday
  • 4 = Wednesday
  • 5 = Thursday
  • 6 = Friday
  • 7 = Saturday
firstdayofyear Optional. Specifies the first week of the year. Can be one of the following values:
  • 0 = Use the NLS API setting
  • 1 = Use the first week that includes Jan 1st (default)
  • 2 = Use the first week in the year that has at least 4 days
  • 3 = Use the first full week of the year

Chi tiết kỹ thuật

Hoạt động trong: Từ Access 2000