Contents tagged with sql
-
สร้าง SQL Server database ด้วย PowerShell script
-
SQL tool to export an insert statement
-
SQL statements to create database table SQL Server and MySQL
In this article, I will show you some simple SQL statements for creating a database and table for SQL Server and MySQL database engine.
-
Find a table or stored proc in all databases in the same server
Use this SQL script to find a table or a stored proc in all databases in the same server.
-
primary key ของฐานข้อมูลแบบ relational database คืออะไร?
primary key ก็คือ field หรือ column ที่สร้างความ unique ให้กับแต่ละแถว (row ) หรือ record ในตาราง (table) นั้นๆ
-
SQL Tip ถ้าข้อมูลเยอะขึ้น เราควรแยกไปเป็นตารางใหม่หรือไม่
สมมติเรามีตารางเก็บ posts ใน web blog หรือ forum ที่มีโครงสร้างดังนี้
-
SQL tip ไม่ควรเก็บข้อมูลแบบ comma separate values
เชื่อว่าหลายคนที่ใช้งาน SQL ไมว่าจะใช้ database server ค่ายใดก็ตาม เช่น MySQL , SQL Server, Oracle, etc คงเคยเก็บข้อมูลบาง column ในรูปแบบ comma separated values กันมาบ้าง เช่นข้อมูล list id ของ user เพื่อทำให้ลดการ join table และอื่นๆที่เราคิดว่าทำให้ระบบดูแลได้ง่าย หรือ performance ที่ดีขึ้น