SYSDBA, create the user SIEGE, and grant related permissions (this step can be omitted ):
Create user siege identified by "123456 ";Grant create session to siege;Grant create table to siege;Grant create tablespace to siege;Grant create view to siege;Grant create any trigger to siege;Create tablespace learning;DATAFILE 'd: \ oraclexe \ app \ oracle \ oradata \ XE \ leaning. dbf'SIZE 100 MAutoextend on next 5 m maxsize 200 M;
Alter user siege default tablespace leaning;Alter user siege quota unli
50 common SQL statements
Student (S #, Sname, Sage, Ssex) Student tableCourse (C #, Cname, T #) CurriculumSC (S #, C #, score) Orders tableTeacher (T #, Tname) Instructor table
Problem:1. query the student ID of all students whose score is higher than that of the "002" course;Select a. S # from (select s #, score from SC where C # = '001') a, (select s #, scoreFrom SC where C # = '002') BWhere a. score> B. score and a. s # = B. s #;2. query the stude
The so-called Motherland
Mencius saw Qi Xuan Wang say: "The so-called motherland, not that there is a tree that also said, there is a minister that also said. Wang has no parents, and the past has entered. Today, I do not know whether it will die ."
Wang said: "Why did I give away without knowledge ?"
Said: "If the king of the country has to step into the sages, it will make the humble more than Zun, more than Qi, can be accidentally? Both the right and right are said to the
?
Li shutong (). Buddha (on) (Kindle locations 628-630)... kindle edition.
?
Ten trainings
This is an impressive part of my reading in the car. I dare not say that I know more about Buddhism, but I am deeply impressed with the concepts mentioned in the book. If you can do the following ten points, it is also a free person. You can refer to such standards to limit yourself to improve the realm.
?
1,ImaginaryOrdinary people do not understand good and evil, do not fear the cause and effect, and nev
Student (s #, sname, sage, ssex) Student tableCourse (C #, cname, T #) CurriculumSC (s #, C #, score) Orders tableTeacher (T #, tname) Instructor table
Problem:1. query the student ID of all students whose score is higher than that of the "002" course;Select a. s # From (select s #, score from SC where C # = '001') A, (select s #, scoreFrom SC where C # = '002') BWhere a. score> B. score and a. s # = B. S #;2. query the student ID and average score of
Tags: database single table query whereA single table query is the scope of a query is just a table, we have one of the fields, or a number of fields to query back, the query can also meet certain conditions.Below we will follow the actual problem, to learn the single-table query. First, the original is a student table, which has several fields as follows:School Number: SnumName: snameAge: SageGender: SsexFaculties: DepartmentCourse: CourseScore: Score CREATE TABLE student (Snum int (5), sname v
Student (s#,sname,sage,ssex) Student tableCourse (c#,cname,t#) timetableSC (s#,c#,score) score sheetTeacher (t#,tname) Teacher's TableProblem:1, Query the "001" Course than "002" course scores of all students of the school number;
Copy Code code as follows:
Select a.s# from (select S#,score from SC where c#= ' 001 ') A, (select S#,score
From SC where c#= ' 002 ') b
where A.score>b.score and a.s#=b.s#;
2, the average score i
Outer JOIN usage in SQL Server 2005 one:
There are two tables: Student table, student selection timetable, the table data are:
Student table:
Students choose the timetable:
To view all students ' elective information,
The standard SQL statement, the OUTER JOIN statement is
Use Stu_course
Select L.sno,sname,ssex,sage,sdept,cno,grade from
student L,sc
where L.SNO=SC.SNO (*)
The theoretical results are:
However, an error occurs
snumber;int sage; Stu.sage=
}
Class variables: Accessed by class name for all instance share access: public static void Main (string[] args) {
public class Student {
Static String sname;String Snumber;
int sage;
}
7. The instance method has no static modification, and the class method is modified with static.
Class method cannot access an instance variable without a static modifier in a static decorated
Al
Tags: sequential computer name student i+1 While Statement update processing declaration2017.11.17Seven. Inserting, updating and deleting data:1. Insert data into the table:Inserting using the INSERT statementThe traditional INSERT statement basic syntax format:Insert into table name values (value 1, value 2,...) You can also specify a column that says you want to insert data:INSERT INTO table_name (column 1, column 2,...) VALUES (value 1, value 2,...)(parameter into is an optional keyword) Exam
Label:Connect to the SQL database in C #.The code is as follows:String sconn = @ "Data source=.;Initial Catalog=dbs; Integrated Security=true ";SqlConnection conn = new SqlConnection (sconn);Create a string that contains information about the database. Data Source =. Represents a database as a local database. Initial Catalog=dbs indicates that the database is connected.Put in a Botton_click function:private void Btngetdata_click (object sender, EventArgs e){The teacher put in each Botton_cl
Article Source: http://www.ynpxrz.com/n822738c2024.aspxT_tudent (sid,sname,sage,ssex,sdept) Student tableT_course (Cid,cname,tid) timetableT_score (scid,sid,cid,grade) score tableT_teacher (tid,tname) Teacher tableProblem:1, the inquiry "001" course is higher than "002" of all students of the school number;SelectT1.sid from(SelectSid,grade fromT_scorewhereCid= '001') T1, (SelectSid,grade fromT_scorewhereCid= '002') T2whereT1.grade>T2.grade andT1.sid=T
A query statement1 DISTINCT keyword eliminates duplicate rowsWhen duplicate data appears in the result data of the query, add the DISTINCT keyword to eliminate duplicate rows in the query condition;Such as: SELECT distinct Sno from SC;2 like match wildcard% and _%: A string representing any length (including 0), for example: Like ' a%b ', a string of any length beginning with a and ending with B;_: Represents any single character, note that the database character set is ASCII when a Chinese char
Tags: Tween group by order Search show amp ASP other totalHttp://www.ynpxrz.com/n822738c2024.aspx T_tudent (sid,sname,sage,ssex,sdept) Student table T_course (Cid,cname,tid) timetable T_score (scid,sid,cid,grade) score table T_teacher (tid,tname) Teacher table Problem: 1, the inquiry "001" course is higher than "002" of all students of the school number; Select T1.sid from (select Sid,grade from t_score WHERE cid = ' 001 ') T1, (select Sid,grade from
Label:first, the establishment of the table instructions For example, create a student table student, it consists of the number SNO, name sname, sex ssex, age sage, the department sdept five attributes. Where the number cannot be null, the value is unique, and the name value is unique. CREATE TABLE Student (Sno CHAR (Ten) is not NULL UNIQUE, Sname CHAR (a) UNIQUE, Ssex char (2), Sage INT, sdept char
This text has been reprinted online, and some SQL statements are suitable for use in application systems. Some "reports" have a heavier feeling, mainly to review the former.
This text has been reprinted online, and some SQL statements are suitable for use in application systems. Some "reports" are more likely to be used, mainly to review the former.
50 common SQL statements
Student (S #, Sname, Sage, Ssex) Student table
Course (C #, Cname, T #) Curr
The not in problem in oracle has been busy recently. It's not a day or a night. I haven't had time to write a blog for a long time. Today, it's a very strange problem. It's been a long time since I had to write a blog. Www.2cto.com [SQL] select * from wlbtest3 where (sname, sage) not in (select user_name, user_age from wlbtest4) select * from wlbtest3 where (sname | sage) not in (select user_name | user_age
(1) Create a database XsglCREATE DATABASE XSGL;(2) Create a student table in XSGL with the following table structure:1 CREATE TABLE Student (2SnoChar( A) not NULL PRIMARY KEY,3Sname varchar (Ten) not NULL,4Ssexenum('male','female') NULL,5Sage tinyint (4) NULL,6SdeptChar( -)default 'Computer Department'7)(3) Insert the following data in the student table:1 INSERT into student (sno,sname,ssex,sage,sdept) VALUES2('9512101','Li Yong','male',' +','Computer
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.