📄 example.pc
字号:
#include <stdio.h>
EXEC SQL BEGIN DECLARE SECTION;
char username[20];
char password[20];
EXEC SQL END DECLARE SECTION;
EXEC SQL INCLUDE sqlca;
main()
{
EXEC SQL BEGIN DECLARE SECTION;
char student[20];
char title[20];
float score;
EXEC SQL END DECLARE SECTION;
strcpy(username,"Tyears");
strcpy(password,"sa");
EXEC SQL CONNECT :username IDENTIFIED BY :password;
printf(":\nConnected to ORACLE as user:%s\n",username);
EXEC SQL SELECT title,score INTO :title,:score FROM test
WHERE student='王喃';
printf("\n%s",title);
printf("\n%d",score);
printf("\t");
exit(0);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -