Drop files here

SQL upload ( 0 ) x -

Page-related settings Click on the bar to scroll to top of page
Press Ctrl+Enter to execute query Press Enter to execute query
ascending
descending
Order:
Debug SQL
Count
Execution order
Time taken
Order by:
Group queries
Ungroup queries
Collapse Expand Show trace Hide trace Count : Time taken :
Bookmarks
Refresh
Add
No bookmarks
Add bookmark
Options
Set default





Collapse Expand Requery Edit Explain Profiling Bookmark Query failed Database : Queried time :
Table structure
Settings for the table structure (list of columns).
Table structure
Documentation Whether the table structure actions should be hidden. Restore default value
Documentation Whether column comments should be shown in table structure view Restore default value
Default transformations
Documentation Values for options list for default transformations. These will be overwritten if transformation is filled in at table structure page. Restore default value
Documentation Values for options list for default transformations. These will be overwritten if transformation is filled in at table structure page. Restore default value
Documentation Values for options list for default transformations. These will be overwritten if transformation is filled in at table structure page. Restore default value
Documentation Values for options list for default transformations. These will be overwritten if transformation is filled in at table structure page. Restore default value
Documentation Values for options list for default transformations. These will be overwritten if transformation is filled in at table structure page. Restore default value
Documentation Values for options list for default transformations. These will be overwritten if transformation is filled in at table structure page. Restore default value
Documentation Values for options list for default transformations. These will be overwritten if transformation is filled in at table structure page. Restore default value
Documentation Values for options list for default transformations. These will be overwritten if transformation is filled in at table structure page. Restore default value
Documentation Values for options list for default transformations. These will be overwritten if transformation is filled in at table structure page. Restore default value

treatments

# Name Type Collation Attributes Null Default Comments Extra Action
1 int(11) No None AUTO_INCREMENT Change Change Drop Drop
2 int(11) No None FK อ้างอิง opd_patients Change Change Drop Drop
3 int(11) No None FK อ้างอิง users (แพทย์ผู้รับผิดชอบหลัก) Change Change Drop Drop
4 int(11) Yes NULL FK อ้างอิง appointments (ถ้ามาจากการนัด) Change Change Drop Drop
5 datetime No None วันเวลาที่ทำการรักษา Change Change Drop Drop
6 decimal(12,2) No 0.00 ยอดรวมค่ารักษาครั้งนี้ (คำนวณจาก items) Change Change Drop Drop
7 decimal(10,2) No 0.00 ยอดรวมค่าคอมแพทย์ครั้งนี้ (คำนวณจาก items) Change Change Drop Drop
8 decimal(10,2) No 0.00 ยอดรวมค่าคอมพนักงานครั้งนี้ (คำนวณจาก items) Change Change Drop Drop
9 enum('Cash', 'Credit Card', 'Bank Transfer', 'PayP... utf8mb4_general_ci Yes NULL ช่องทางการชำระเงิน Change Change Drop Drop
10 varchar(100) utf8mb4_general_ci Yes NULL รายละเอียดช่องทางอื่น ๆ Change Change Drop Drop
11 enum('Unpaid', 'Partially Paid', 'Paid') utf8mb4_general_ci No Unpaid สถานะการชำระเงิน Change Change Drop Drop
12 int(11) Yes NULL FK อ้างอิง invoices (ถ้า treatment นี้ถูกรวมใน invoice แล้ว) Change Change Drop Drop
13 decimal(12,2) No 0.00 ยอดรวมที่ชำระแล้ว Change Change Drop Drop
14 text utf8mb4_general_ci Yes NULL หมายเหตุรวมสำหรับการรักษาครั้งนี้ Change Change Drop Drop
15 timestamp Yes current_timestamp() Change Change Drop Drop
16 timestamp Yes current_timestamp() ON UPDATE CURRENT_TIMESTAMP() Change Change Drop Drop
17 int(11) Yes NULL FK อ้างอิง users (ผู้บันทึกข้อมูล) Change Change Drop Drop
With selected: With selected:

Add column  Add column(s)  
Indexes Documentation
Action Keyname Type Unique Packed Column Cardinality Collation Null Comment
Edit Edit Rename Rename Drop Drop PRIMARY BTREE Yes No id 814 A No
Edit Edit Rename Rename Drop Drop created_by BTREE No No created_by 2 A Yes
Edit Edit Rename Rename Drop Drop idx_trt_patient_id BTREE No No opd_patient_id 814 A No
Edit Edit Rename Rename Drop Drop idx_trt_doctor_id BTREE No No doctor_id 6 A No
Edit Edit Rename Rename Drop Drop idx_trt_appointment_id BTREE No No appointment_id 45 A Yes
Edit Edit Rename Rename Drop Drop idx_trt_datetime BTREE No No treatment_datetime 814 A No
Edit Edit Rename Rename Drop Drop idx_trt_payment_method BTREE No No payment_method 14 A Yes
Edit Edit Rename Rename Drop Drop idx_trt_payment_status BTREE No No payment_status 6 A No
Edit Edit Rename Rename Drop Drop idx_treat_invoice_id BTREE No No invoice_id 22 A Yes
Create an index on columns
Partitions Documentation
Information
Space usage
Data 1.5 MiB
Index 128.0 KiB
Overhead 4.0 MiB
Effective -2,490,368 B
Total 1.6 MiB
Optimize table Optimize table
Row statistics
Format dynamic
Collation utf8mb4_general_ci
Next autoindex 837
Creation Apr 02, 2025 at 02:54 PM
Last update Jun 28, 2026 at 12:24 AM
Last check Jun 28, 2026 at 07:42 PM