<table name="students" fullname="List of Students" desc="List of students with their full names"> <columns> <column name="id" fullname="Primary Key" type="integer" key="1" desc="Primary key for the table"/> <column name="student_name" fullname="Student Name" type="varchar" size="80" desc="The full name of the student"/> </columns> </table> </schema> |
DROP TABLE students; CREATE TABLE students ( id integer, student_name varchar(80), CONSTRAINT pk_students PRIMARY KEY (id)); COMMENT ON TABLE students IS 'List of students with their full names'; COMMENT ON COLUMN students.id IS 'Primary key for the table'; COMMENT ON COLUMN students.student_name IS 'The full name of the student'; |
<schema> <table name="students" fullname="List of Students" desc="List of students"> <columns> <column name="id" fullname="Primary Key" type="integer" key="1" desc="Primary key for the table"/> <column name="student_name" fullname="Student Name" type="varchar" size="100" desc="The full name of the student"/> <column name="email" fullname="Electronic mail address" type="varchar" size="100" desc="The primary email for the student"/> </columns> </table> </schema> |
ALTER TABLE students ALTER student_name TYPE varchar(80); ALTER TABLE students DROP email; COMMENT ON TABLE students IS 'List of students with their full names'; |
欢迎光临 DIY编程器网 (http://diybcq.com/) | Powered by Discuz! X3.2 |