INSERT INTO `score` VALUES ( 36, 9, 3, 67 )
INSERT INTO `score` VALUES ( 35, 9, 2, 88 ) INSERT INTO `score` VALUES ( 34, 9, 1, 91 ) INSERT INTO `score` VALUES ( 33, 8, 4, 88 ) INSERT INTO `score` VALUES ( 32, 8, 3, 67 ) INSERT INTO `score` VALUES ( 31, 8, 2, 100 ) INSERT INTO `score` VALUES ( 30, 8, 1, 9 ) INSERT INTO `score` VALUES ( 29, 7, 4, 88 ) INSERT INTO `score` VALUES ( 28, 7, 3, 67 ) INSERT INTO `score` VALUES ( 27, 7, 2, 100 ) INSERT INTO `score` VALUES ( 26, 7, 1, 9 ) INSERT INTO `score` VALUES ( 25, 6, 4, 100 ) INSERT INTO `score` VALUES ( 24, 6, 3, 67 ) INSERT INTO `score` VALUES ( 23, 6, 2, 100 ) INSERT INTO `score` VALUES ( 22, 6, 1, 9 ) INSERT INTO `score` VALUES ( 21, 5, 4, 100 ) INSERT INTO `score` VALUES ( 20, 5, 3, 67 ) INSERT INTO `score` VALUES ( 19, 5, 2, 11 ) INSERT INTO `score` VALUES ( 18, 5, 1, 79 ) INSERT INTO `score` VALUES ( 17, 4, 4, 100 )
INSERT INTO `score` VALUES ( 16, 4, 3, 67 ) INSERT INTO `score` VALUES ( 15, 4, 2, 11 ) INSERT INTO `score` VALUES ( 14, 4, 1, 79 ) INSERT INTO `score` VALUES ( 13, 3, 4, 99 ) INSERT INTO `score` VALUES ( 12, 3, 3, 87 ) INSERT INTO `score` VALUES ( 11, 3, 2, 66 ) INSERT INTO `score` VALUES ( 10, 3, 1, 77 ) INSERT INTO `score` VALUES ( 9, 2, 4, 99 ) INSERT INTO `score` VALUES ( 8, 2, 3, 68 ) INSERT INTO `score` VALUES ( 6, 2, 1, 8 ) INSERT INTO `score` VALUES ( 5, 1, 4, 66 ) INSERT INTO `score` VALUES ( 2, 1, 2, 9 ) INSERT INTO `score` VALUES ( 1, 1, 1, 10 ) ) ENGINE = InnoDB AUTO_INCREMENT = 53 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic
INDEX `fk_score_course`(`course_id`) USING BTREE,ĬONSTRAINT `fk_score_course` FOREIGN KEY (`course_id`) REFERENCES `course` (`cid`) ON DELETE RESTRICT ON UPDATE RESTRICT ,ĬONSTRAINT `fk_score_student` FOREIGN KEY (`student_id`) REFERENCES `student` (`sid`) ON DELETE RESTRICT ON UPDATE RESTRICT INDEX `fk_score_student`(`student_id`) USING BTREE, INSERT INTO `course` VALUES ( 4, ' the fine arts ', 2 ) INSERT INTO `course` VALUES ( 3, ' sports ', 3 ) INSERT INTO `course` VALUES ( 2, ' physical ', 2 ) INSERT INTO `course` VALUES ( 1, ' biological ', 1 ) INDEX `fk_course_teacher`(`teacher_id`) USING BTREE,ĬONSTRAINT `fk_course_teacher` FOREIGN KEY (`teacher_id`) REFERENCES `teacher` (`tid`) ON DELETE RESTRICT ON UPDATE RESTRICT `cname` varchar( 32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , INSERT INTO `class` VALUES ( 4, ' 9 class for two years ' ) INSERT INTO `class` VALUES ( 3, ' class two a year ' ) INSERT INTO `class` VALUES ( 2, ' three years of class 3 ' )
INSERT INTO `class` VALUES ( 1, ' three years class two ' ) ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic `caption` varchar( 32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , In today's blog, we'll compare the two categories to decide when to use one over the other.- DROP TABLE IF EXISTS `class` These equate to nchar, nvarchar, and ntext for Unicode types and char, varchar/varchar (max) and text for non-Unicode. Moreover, SQL Server splits its string types into two broad categories: Unicode and non-Unicode. In the context of relational databases, character string data types are those which allow you to store either fixed-length (char) or variable-length data (varchar).
A character string is a series of characters manipulated as a group. One data type that causes some confusion among database designers and developers are those for storing character strings. It can be an integer, character string, monetary, date and time, and so on. As you may have guessed, data type is an attribute that specifies the type of data that a column can store. SQL Server provides a number of data types that support all types of data that you may want to store. Unicode and Non-Unicode String Data Types in SQL Server Unicode and Non-Unicode String Data Types in SQL Server by Robert Gravelle