Thêm cột:
ALTER TABLE TableName ADD ColumnName INT
VD: ALTER TABLE HocSinh ADD NgaySinh DateTime
Đổi tên cột:
The script for renaming any column :
sp_RENAME 'TableName.[OldColumnName]' , '[NewColumnName]', 'COLUMN'
The script for renaming any object (table, sp etc) :
sp_RENAME '[OldTableName]' , '[NewTableName]'
(http://blog.sqlauthority.com/2008/08/26/sql-server-how-to-rename-a-column-name-or-table-name/)
Có thể tôi không phải là người bạn cảm thấy yêu thương nhưng tôi cũng xin cảm ơn vì bạn đã có mặt trên đời và cho tôi biết rằng được yêu thương ai đó là điều hạnh phúc
Thứ Ba, 28 tháng 6, 2011
Thứ Bảy, 25 tháng 6, 2011
jQuery: How to return value from anonymous function
Apparantely jQuery's post function is only asynchronous, so you cannot.
... use the $.ajax function and set the async option to false ...
(http://www.webdeveloper.com/forum/showthread.php?t=215229)
... use the $.ajax function and set the async option to false ...
(http://www.webdeveloper.com/forum/showthread.php?t=215229)
Thứ Tư, 22 tháng 6, 2011
SQL SERVER – Drop Contraint
/* For SQL Server/Oracle/MS ACCESS */
ALTER TABLE Table1
DROP CONSTRAINT PK_Table1_Col1
GO
/* For MySql */
ALTER TABLE Table1
DROP PRIMARY KEY
GO
(http://blog.sqlauthority.com/2009/05/12/sql-server-how-to-drop-primary-key-contraint)
SQL SERVER – Create Default Constraint Over Table Column
ALTER TABLE Customers
ADD CONSTRAINT DF_Customers_Address2
DEFAULT 'UNKNOWN' FOR Address2
(http://blog.sqlauthority.com/2008/05/31/sql-server-create-default-constraint-over-table-column)
Chủ Nhật, 19 tháng 6, 2011
Đăng ký:
Bài đăng (Atom)