Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL-313 - Convert integer to string in SQL and PostgreSQL #307

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions sql-queries-2/sql-distinct/distinct-values.sql

This file was deleted.

2 changes: 2 additions & 0 deletions sql-queries-8/integer-to-string/int-to-string-mssql.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SELECT CONVERT(VARCHAR, national_id) + name AS faculty_info
FROM Faculty;
2 changes: 2 additions & 0 deletions sql-queries-8/integer-to-string/int-to-string-mysql.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SELECT CAST(national_id AS CHAR) || name AS faculty_info
FROM Faculty;
6 changes: 6 additions & 0 deletions sql-queries-8/integer-to-string/integer-to-string-pg.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SELECT *
FROM Faculty;

SELECT national_id::text || name
FROM Faculty
LIMIT 2;